Skip to content
Advertisement

SQL query to select parent and child names in one row

i have table in hsqldb and values like this

enter image description here

How do I write a query that displays like this

enter image description here

Advertisement

Answer

Here you go:

Result:

For reference this is the data script I used to test:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement