Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. select nazwisko from uzytkownik as u
  2. where
  3. exists(
  4. select * from wybor
  5. join uzytkownik as u3 using(kod_uz)
  6. join grupa using(kod_grupy)
  7. join przedmiot_semestr using(kod_przed_sem)
  8. where semestr_id = 39 and u.kod_uz = u3.kod_uz)
  9. and
  10. exists(
  11. select * from wybor
  12. join uzytkownik as u2 using(kod_uz)
  13. join grupa using(kod_grupy)
  14. join przedmiot_semestr using(kod_przed_sem)
  15. where semestr_id = 38 and u.kod_uz = u2.kod_uz)
  16.  
  17. order by nazwisko desc
  18. limit 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement