Guest User

Untitled

a guest
Jan 15th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. select a.soda, a.person
  2. from table a
  3. where not exists(select 1
  4. from table b
  5. where b.person = a.person
  6. and b.soda <> a.soda)
  7.  
  8. select distinct * from sodas as s1 where s1.name not in (select s2.name from sodas as s2 where s2.name=s1.name and s2.soda <> s1.soda)
Add Comment
Please, Sign In to add comment