Question: Hello, I have a question that I would like to ask you today with SQL. I have a database as I mentioned in the attachment.

Hello, I have a question that I would like to ask you today with SQL. I have a database as I mentioned in the attachment. We can think of it as a small-scale family family tree. A family tree of family relationships that includes one's mother, father, grandfather, grandmother, uncles, aunts, and cousins. For example, the person with id number 6 is actually the paternal cousin of the person with id number 24. The person with id number 6 becomes his uncle's son.

How can I extract this with a query? Additionally how can I list all cousins of the person with id 6 like this?

I can't upload images to Chegg because it gives me an error. Screenshots link: https://file.io/UfYVdCT3oHXd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!