Changes between Version 6 and Version 7 of AdvancedReports


Ignore:
Timestamp:
01/01/23 22:50:02 (23 months ago)
Author:
181213
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v6 v7  
    5757order by broj_naracki desc
    5858}}}
    59 - Кој корисник колку има платено во секој ресторан подредено?
     59- Кој корисник колку има платено во секој ресторан подредено
     60{{{#!sql
     61select k2.user_ime as ime, k2.user_prezime as prezime, r2.restoran_ime as restoran, q1.plateno as plateno from(
     62select ku.user_id, r.restoran_id, sum(sso.cena * sso.kolicina) as plateno
     63from korisnik k
     64join kupuvac as ku on k.user_id =ku.user_id
     65join naracka as n on ku.user_id =n.user_id_kupuvac
     66join se_sostoi_od as sso on n.naracka_id =sso.naracka_id
     67join obrok as o on sso.obrok_id =o.obrok_id
     68join meni as m on o.meni_id=m.meni_id
     69join restoran as r on m.restoran_id =r.restoran_id
     70group by  ku.user_id ,r.restoran_id)q1 join korisnik k2 on q1.user_id=k2.user_id  join restoran r2 on q1.restoran_id=r2.restoran_id
     71order by plateno desc
     72}}}