Advertisement
rakoczyn

Untitled

Nov 14th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. select Data_wyp,Miasto,Ulica,Numer
  3. from wypozyczenie, miejsce
  4. where Data_wyp is not NULL and wypozyczenie.Miejsce_wyp = miejsce.ID
  5.  
  6.  
  7. select Miasto,Ulica,Numer
  8. from miejsce left outer join wypozyczenie
  9. on miejsce.ID = Miejsce_wyp
  10. where Data_wyp is NULL
  11.  
  12.  
  13. select MAX(Kwota),ID_Klienta
  14. from wypozyczenie
  15. group by ID_Klienta
  16.  
  17. select Miasto,Ulica,COUNT(*)
  18. from miejsce
  19. group by Miasto,Ulica
  20. */
  21.  
  22. SELECT Klient.Nazwisko,Klient.Imie,COUNT(*)
  23. FROM Klient /*right outer*/ JOIN wypozyczenie
  24. ON wypozyczenie.ID_Klienta = Klient.ID
  25. GROUP BY Nazwisko,Imie
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement