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_at_f1g2000cwa.googlegroups.com>
Date: 2 Dec 2006 08:45:42 -0800
Message-ID: <1165077942.178555.322490_at_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 - 17:45:42 CET