Changes between Version 48 and Version 49 of AdvancedReports


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v48 v49  
    9898{{{#!div style="font-size: 90%"
    9999  {{{#!sql
    100 select e2."name", q4.max_broj_zainteresirani
    101 from    (
    102 (
    103         select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    104         from ticket t
    105         join events e on t.id_event = e.id_event
    106         join users u on t.id_user_customer = u.id_user
    107         join cart c on c.id_user_customer = t.id_user_customer
    108         where e."date" between current_date - interval '100 days' and current_date
    109         group by e.id_event
     100select e2."name", e2."date", e2.city, e2.price, q4.max_broj_zainteresirani
     101from    (
     102(
     103        select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
     104        from ticket t
     105        join events e on t.id_event = e.id_event
     106        join users u on t.id_user_customer = u.id_user
     107        join cart c on c.id_user_customer = t.id_user_customer
     108        where e."date" between current_date - interval '100 days' and current_date
     109        group by e.id_event
    110110) q1
    111111
     
    113113
    114114(
    115         select max(q2.broj_na_zainteresirani_kupuvaci) as max_broj_zainteresirani
    116         from
    117                 (
    118                 select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    119                 from ticket t
    120                 join events e on t.id_event = e.id_event
    121                 join users u on t.id_user_customer = u.id_user
    122                 join cart c on c.id_user_customer = t.id_user_customer
    123                 where e."date" between current_date - interval '100 days' and current_date
    124                 group by e.id_event
     115        select max(q2.broj_na_zainteresirani_kupuvaci) as max_broj_zainteresirani
     116        from
     117                (
     118                select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
     119                from ticket t
     120                join events e on t.id_event = e.id_event
     121                join users u on t.id_user_customer = u.id_user
     122                join cart c on c.id_user_customer = t.id_user_customer
     123                where e."date" between current_date - interval '100 days' and current_date
     124                group by e.id_event
    125125) q2 ) q3
    126126on
    127         q1.broj_na_zainteresirani_kupuvaci = q3.max_broj_zainteresirani)
     127        q1.broj_na_zainteresirani_kupuvaci = q3.max_broj_zainteresirani)
    128128as q4
    129129join events e2 on q4.id_event = e2.id_event