Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL query to retrieve families with only one generation from a family db

728024Oct 14 2009 — edited Oct 14 2009
Hi,
I need to write an SQL query that would select families with only one generation ((which means a person - or a married couple - with kids) or (a person - or a married couple - with parents but no kids)) from a database containing families. The simplified db structure is:

person:
id - int, primary key

siblings:
id
parent_id
kid_id

marriage
id:
husband_id
wife_id

Could anyone please help me? I dont really have any idea how to accomplish that...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2009
Added on Oct 14 2009
1 comment
693 views