Skip to content
Advertisement

Query to get all siblings

I have table like that:

I need query that with specific parameter as NAME and surname will return me all siblings of a person. Expected output

I tried

Advertisement

Answer

You can use a SUB QUERY to achieve this.

Table Creation:

Table Insertion:

Query:

Output:

enter image description here Also ,add the WHERE clause based on your parameter requirement.

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