Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: How to find Brothers and Sisters?

Re: How to find Brothers and Sisters?

From: Cimode <cimode_at_hotmail.com>
Date: 2 Dec 2006 08:45:42 -0800
Message-ID: <1165077942.178555.322490@f1g2000cwa.googlegroups.com>


Just for sisters...

 select P2.name, P2.sex
 from person P2 inner join link on P2.id = link.parent  inner join (select id from link inner join person P1

                on child = person.id where person.name = 'John') B
 on P2.id = B.id
 where P2.name <> 'John'
and P2.sex='Female' Received on Sat Dec 02 2006 - 10:45:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US