| 108 | | (select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" |
| 109 | | from ticket t |
| 110 | | join events e on t.id_event=e.id_event |
| 111 | | group by godina, t."location" |
| | 108 | |
| | 109 | (select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" |
| | 110 | from ticket t |
| | 111 | join events e on t.id_event=e.id_event |
| | 112 | group by godina, t."location" |
| | 113 | ) q1 |
| 113 | | ) q1 |
| 114 | | |
| 115 | | join |
| 116 | | ( |
| 117 | | select max(q2.broj_nastani) as max_broj_nastani |
| 118 | | from ( |
| 119 | | select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" |
| 120 | | from ticket t |
| 121 | | join events e on t.id_event=e.id_event |
| 122 | | group by godina, t."location" |
| 123 | | ) q2 |
| 124 | | ) q3 |
| 125 | | on q1.broj_nastani=q3.max_broj_nastani) q4 |
| | 115 | join |
| | 116 | |
| | 117 | ( |
| | 118 | select max(q2.broj_nastani) as max_broj_nastani |
| | 119 | from ( |
| | 120 | select extract (year from t.date) as godina, count(distinct e.id_event) broj_nastani, t."location" |
| | 121 | from ticket t |
| | 122 | join events e on t.id_event=e.id_event |
| | 123 | group by godina, t."location" |
| | 124 | ) q2 ) q3 |
| | 125 | on q1.broj_nastani=q3.max_broj_nastani |
| | 126 | ) |
| | 127 | |
| | 128 | as q4 |