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 |
| 100 | select e2."name", e2."date", e2.city, e2.price, 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 |
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 |