Advertisement
rakoczyn

Untitled

Nov 14th, 2011
85
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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement