Changes between Version 20 and Version 21 of AdvancedReports


Ignore:
Timestamp:
12/23/22 18:49:59 (2 years ago)
Author:
191285
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v20 v21  
    139139{{{#!div style="font-size: 90%"
    140140  {{{#!sql
    141 select p.ime as predmet, n.ime as nastavnik, count(u.id_ucenik) as br_ucenici
    142 from predmeti p
    143 join predava_predmet pp on p.id_predmet = pp.id_predmet
    144 join nastavnici n on pp.id_nastavnik = n.id_nastavnik
    145 join predava_na pn on n.id_nastavnik = pn.id_nastavnik
    146 join ucenici u on u.id_ucenik =pn.id_ucenik
    147 where p.id_predmet = 1
    148 group by p.ime, n.ime
    149 order by br_ucenici desc
     141select u."name", u.surname, count(e.id_event) as broj_nastani
     142from artist a join users u on a.id_user =u.id_user
     143join events e on a.id_user =e.id_user_artist
     144where u.id_user in (
     145select u.id_user
     146from artist a join users u on a.id_user =u.id_user
     147join events e on a.id_user =e.id_user_artist
     148where e.id_event =1
     149group by  u.id_user )
     150group by  u."name", u.surname
    150151  }}}
    151152}}}