Changes between Version 35 and Version 36 of AdvancedReports


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v35 v36  
    106106select q4."location", q4.max_broj_nastani
    107107from (
    108               (select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
    109                 from ticket t
    110                 join events e  on t.id_event=e.id_event
    111                 group by godina,  t."location"
     108
     109(select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
     110from ticket t
     111join events e on t.id_event=e.id_event
     112group by godina, t."location"
     113) q1
    112114               
    113                ) q1
    114                
    115                 join
    116                 (
    117                 select max(q2.broj_nastani) as max_broj_nastani
    118                 from (
    119                 select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
    120                 from ticket t
    121                 join events e  on t.id_event=e.id_event
    122                 group by godina,  t."location"
    123                 ) q2
    124                 ) q3
    125        on q1.broj_nastani=q3.max_broj_nastani) q4
     115join
     116
     117(
     118select max(q2.broj_nastani) as max_broj_nastani
     119from (
     120select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
     121from ticket t
     122join events e on t.id_event=e.id_event
     123group by godina, t."location"
     124) q2 ) q3
     125on q1.broj_nastani=q3.max_broj_nastani
     126)
     127
     128as q4
    126129  }}}
    127130}}}
     
    132135  {{{#!sql
    133136select q4."name", q4.surname, q4.max_broj_nastani
    134 from(
     137from (
    135138
    136139(select u."name", u.surname, count(e.id_event) as broj_nastani