Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- where
- tablea.field1 >= 4 and tableb.field3 = 'male'
- CREATE TABLE parent
- (pID NUMBER,
- numberkids INTEGER)
- CREATE TABLE kids
- (kID NUMBER,
- father NUMBER,
- mother NUMBER,
- gender VARCHAR(7))
- select
- p.pid
- from
- kids k
- inner join parent pm on pm.pid = k.mother
- inner join parent pf on pf.pid = k.father,
- parent p
- where
- p.numberkids >= 2 and k.gender 'male'
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement