Changes between Version 40 and Version 41 of AdvancedReports


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v40 v41  
    101101  {{{#!sql
    102102select e2."name", q4.max_broj_zainteresirani
    103 from (
    104 (select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    105 from ticket t 
    106 join events e on t.id_event=e.id_event
    107 join users u on t.id_user_customer=u.id_user
    108 join cart c on c.id_user_customer=t.id_user_customer
    109 where e."date" between current_date - interval '100 days' and current_date
    110 group by e.id_event
     103from
     104        (
     105(
     106        select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
     107        from ticket t
     108        join events e on t.id_event = e.id_event
     109        join users u on t.id_user_customer = u.id_user
     110        join cart c on c.id_user_customer = t.id_user_customer
     111        where e."date" between current_date - interval '100 days' and current_date
     112        group by e.id_event
    111113) q1
    112 
    113114join
    114115
    115 (select max(q2.broj_na_zainteresirani_kupuvaci) as max_broj_zainteresirani
    116 from (
    117 select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    118 from ticket t 
    119 join events e on t.id_event=e.id_event
    120 join users u on t.id_user_customer=u.id_user
    121 join cart c on c.id_user_customer=t.id_user_customer
    122 where e."date" between current_date - interval '100 days' and current_date
    123 group by e.id_event
     116(
     117        select max(q2.broj_na_zainteresirani_kupuvaci) as max_broj_zainteresirani
     118        from
     119                (
     120                select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
     121                from ticket t
     122                join events e on t.id_event = e.id_event
     123                join users u on t.id_user_customer = u.id_user
     124                join cart c on c.id_user_customer = t.id_user_customer
     125                where e."date" between current_date - interval '100 days' and current_date
     126                group by e.id_event
    124127) q2 ) q3
    125 on q1.broj_na_zainteresirani_kupuvaci=q3.max_broj_zainteresirani)
     128on q1.broj_na_zainteresirani_kupuvaci = q3.max_broj_zainteresirani)
    126129
    127130as q4
    128 join events e2 on q4.id_event=e2.id_event
     131join events e2 on q4.id_event = e2.id_event
    129132  }}}
    130133}}}