View difference between Paste ID: QTrZbfkQ and siGj0qKc
SHOW: | | - or go back to the newest paste.
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 miejsce.Miasto,COUNT(*)
17+
select Miasto,Ulica,COUNT(*)
18
from miejsce
19-
group by Miasto
19+
group by Miasto, Ulica
20