Changes between Version 30 and Version 31 of AdvancedReports
- Timestamp:
- 12/24/22 15:54:32 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedReports
v30 v31 73 73 ((select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci 74 74 from 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 75 join events e on t.id_event=e.id_event 76 join users u on t.id_user_customer=u.id_user 77 join cart c on c.id_user_customer=t.id_user_customer 80 78 where e."date" between current_date - interval '100 days' and current_date 81 79 group by e.id_event ) q1 … … 88 86 select e.id_event, count(u.id_user) as broj_na_zainteresirani_kupuvaci 89 87 from 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 88 join events e on t.id_event=e.id_event 89 join users u on t.id_user_customer=u.id_user 90 join cart c on c.id_user_customer=t.id_user_customer 95 91 where e."date" between current_date - interval '100 days' and current_date 96 92 group by e.id_event … … 112 108 (select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" 113 109 from ticket t 114 join events e on t.id_event 110 join events e on t.id_event=e.id_event 115 111 group by godina, t."location" 116 112 … … 123 119 select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" 124 120 from ticket t 125 join events e on t.id_event 121 join events e on t.id_event=e.id_event 126 122 group by godina, t."location" 127 123 ) q2 … … 140 136 141 137 (select u."name", u.surname, count(e.id_event) as broj_nastani 142 from artist a join users u on a.id_user 143 join events e on a.id_user 138 from artist a join users u on a.id_user=u.id_user 139 join events e on a.id_user=e.id_user_artist 144 140 group by u."name", u.surname) q1 145 141 … … 148 144 (select max(q2.broj_nastani) as max_broj_nastani 149 145 from (select u."name", u.surname, count(e.id_event) as broj_nastani 150 from artist a join users u on a.id_user 151 join events e on a.id_user 146 from artist a join users u on a.id_user=u.id_user 147 join events e on a.id_user=e.id_user_artist 152 148 group by u."name", u.surname 153 149 ) q2 ) q3 … … 162 158 {{{#!sql 163 159 select u."name", u.surname, count(e.id_event) as broj_nastani 164 from artist a join users u on a.id_user 165 join events e on a.id_user 160 from artist a join users u on a.id_user=u.id_user 161 join events e on a.id_user=e.id_user_artist 166 162 where u.id_user in ( 167 163 select u.id_user 168 from artist a join users u on a.id_user 169 join events e on a.id_user 170 where e.id_event 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 166 where e.id_event=1 171 167 group by u.id_user ) 172 168 group by u."name", u.surname … … 178 174 {{{#!sql 179 175 select c.id_user, r.rating, count(t.id_transaction) as broj_transakcii 180 from customer c join review r on c.id_user 181 join cart c2 on c.id_user 182 join transactions t on c2.id_user_customer 176 from customer c join review r on c.id_user=r.id_user_customer 177 join cart c2 on c.id_user=c2.id_user_customer 178 join transactions t on c2.id_user_customer=t.id_user_customer 183 179 where r.rating >7 184 180 group by c.id_user, r.rating