AdvancedReports: Script.sql

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