AdvancedReports: Script.sql
File Script.sql, 350 bytes (added by , 23 months ago) |
---|
Line | |
---|---|
1 | select k.ime, count(pk.id_parce) as kupeni_proizvodi_po_kompanija |
2 | from kompanija as k |
3 | left join parce_e_od_kompanija pk on pk.ime = k.ime |
4 | left join parce p on p.id_parce = pk.id_parce |
5 | left join parce_e_del_od_naracki pedon on pedon.id_parce = p.id_parce |
6 | left join naracki n on n.id_naracka = pedon.id_naracka |
7 | |
8 | group by k.ime |
9 | order by k desc |