Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select nazwisko from uzytkownik as u
- where
- exists(
- select * from wybor
- join uzytkownik as u3 using(kod_uz)
- join grupa using(kod_grupy)
- join przedmiot_semestr using(kod_przed_sem)
- where semestr_id = 39 and u.kod_uz = u3.kod_uz)
- and
- exists(
- select * from wybor
- join uzytkownik as u2 using(kod_uz)
- join grupa using(kod_grupy)
- join przedmiot_semestr using(kod_przed_sem)
- where semestr_id = 38 and u.kod_uz = u2.kod_uz)
- order by nazwisko desc
- limit 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement