Changes between Version 30 and Version 31 of AdvancedReports


Ignore:
Timestamp:
12/24/22 15:54:32 (2 years ago)
Author:
181006
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v30 v31  
    7373((select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    7474from ticket t 
    75 join events e
    76 on t.id_event  = e.id_event
    77 join users u
    78 on t.id_user_customer =u.id_user
    79 join cart c on c.id_user_customer =t.id_user_customer
     75join events e on t.id_event=e.id_event
     76join users u on t.id_user_customer=u.id_user
     77join cart c on c.id_user_customer=t.id_user_customer
    8078where e."date" between current_date - interval '100 days' and current_date
    8179group by e.id_event ) q1
     
    8886select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci
    8987from ticket t 
    90 join events e
    91 on t.id_event  = e.id_event
    92 join users u
    93 on t.id_user_customer =u.id_user
    94 join cart c on c.id_user_customer =t.id_user_customer
     88join events e on t.id_event=e.id_event
     89join users u on t.id_user_customer=u.id_user
     90join cart c on c.id_user_customer=t.id_user_customer
    9591where e."date" between current_date - interval '100 days' and current_date
    9692group by e.id_event
     
    112108              (select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
    113109                from ticket t
    114                 join events e  on t.id_event =e.id_event
     110                join events e  on t.id_event=e.id_event
    115111                group by godina,  t."location"
    116112               
     
    123119                select extract (year from t.date) as godina,  count(distinct e.id_event) broj_nastani, t."location"
    124120                from ticket t
    125                 join events e  on t.id_event =e.id_event
     121                join events e  on t.id_event=e.id_event
    126122                group by godina,  t."location"
    127123                ) q2
     
    140136
    141137(select u."name", u.surname, count(e.id_event) as broj_nastani
    142 from artist a join users u on a.id_user =u.id_user
    143 join events e on a.id_user =e.id_user_artist
     138from artist a join users u on a.id_user=u.id_user
     139join events e on a.id_user=e.id_user_artist
    144140group by  u."name", u.surname) q1
    145141
     
    148144(select max(q2.broj_nastani) as max_broj_nastani
    149145from (select u."name", u.surname, count(e.id_event) as broj_nastani
    150 from artist a join users u on a.id_user =u.id_user
    151 join events e on a.id_user =e.id_user_artist
     146from artist a join users u on a.id_user=u.id_user
     147join events e on a.id_user=e.id_user_artist
    152148group by  u."name", u.surname
    153149) q2 ) q3
     
    162158  {{{#!sql
    163159select u."name", u.surname, count(e.id_event) as broj_nastani
    164 from artist a join users u on a.id_user =u.id_user
    165 join events e on a.id_user =e.id_user_artist
     160from artist a join users u on a.id_user=u.id_user
     161join events e on a.id_user=e.id_user_artist
    166162where u.id_user in (
    167163select u.id_user
    168 from artist a join users u on a.id_user =u.id_user
    169 join events e on a.id_user =e.id_user_artist
    170 where e.id_event =1
     164from artist a join users u on a.id_user=u.id_user
     165join events e on a.id_user=e.id_user_artist
     166where e.id_event=1
    171167group by  u.id_user )
    172168group by  u."name", u.surname
     
    178174  {{{#!sql
    179175select c.id_user, r.rating, count(t.id_transaction) as broj_transakcii
    180 from customer c join review r on c.id_user =r.id_user_customer
    181 join cart c2 on c.id_user =c2.id_user_customer
    182 join transactions t on c2.id_user_customer =t.id_user_customer
     176from customer c join review r on c.id_user=r.id_user_customer
     177join cart c2 on c.id_user=c2.id_user_customer
     178join transactions t on c2.id_user_customer=t.id_user_customer
    183179where r.rating >7
    184180group by c.id_user, r.rating