Changes between Version 45 and Version 46 of AdvancedReports


Ignore:
Timestamp:
12/24/22 17:21:47 (2 years ago)
Author:
181006
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v45 v46  
    110110        group by e.id_event
    111111) q1
     112
    112113join
    113114
     
    145146        group by godina, t."location"
    146147) q1
     148
    147149join
    148150
     
    170172  {{{#!sql
    171173select q4."name", q4.surname, q4.max_broj_nastani
    172 from (
    173 
    174 (select u."name", u.surname, count(e.id_event) as broj_nastani
    175 from artist a join users u on a.id_user=u.id_user
    176 join events e on a.id_user=e.id_user_artist
    177 group by  u."name", u.surname) q1
    178 
     174from
     175        (
     176
     177(
     178        select u."name", u.surname, count(e.id_event) as broj_nastani
     179        from artist a
     180        join users u on a.id_user = u.id_user
     181        join events e on a.id_user = e.id_user_artist
     182        group by u."name", u.surname) q1
     183       
    179184join
    180185
    181 (select max(q2.broj_nastani) as max_broj_nastani
    182 from (select u."name", u.surname, count(e.id_event) as broj_nastani
    183 from artist a join users u on a.id_user=u.id_user
    184 join events e on a.id_user=e.id_user_artist
    185 group by  u."name", u.surname
     186(
     187        select max(q2.broj_nastani) as max_broj_nastani
     188        from
     189                (
     190                select u."name", u.surname, count(e.id_event) as broj_nastani
     191                from artist a
     192                join users u on a.id_user = u.id_user
     193                join events e on a.id_user = e.id_user_artist
     194                group by u."name", u.surname
    186195) q2 ) q3
    187 on q1.broj_nastani=q3.max_broj_nastani)
     196on
     197        q1.broj_nastani = q3.max_broj_nastani)
    188198
    189199as q4