172 | | from ( |
173 | | |
174 | | (select u."name", u.surname, count(e.id_event) as broj_nastani |
175 | | from artist a join users u on a.id_user=u.id_user |
176 | | join events e on a.id_user=e.id_user_artist |
177 | | group by u."name", u.surname) q1 |
178 | | |
| 174 | from |
| 175 | ( |
| 176 | |
| 177 | ( |
| 178 | select u."name", u.surname, count(e.id_event) as broj_nastani |
| 179 | from artist a |
| 180 | join users u on a.id_user = u.id_user |
| 181 | join events e on a.id_user = e.id_user_artist |
| 182 | group by u."name", u.surname) q1 |
| 183 | |
181 | | (select max(q2.broj_nastani) as max_broj_nastani |
182 | | from (select u."name", u.surname, count(e.id_event) as broj_nastani |
183 | | from artist a join users u on a.id_user=u.id_user |
184 | | join events e on a.id_user=e.id_user_artist |
185 | | group by u."name", u.surname |
| 186 | ( |
| 187 | select max(q2.broj_nastani) as max_broj_nastani |
| 188 | from |
| 189 | ( |
| 190 | select u."name", u.surname, count(e.id_event) as broj_nastani |
| 191 | from artist a |
| 192 | join users u on a.id_user = u.id_user |
| 193 | join events e on a.id_user = e.id_user_artist |
| 194 | group by u."name", u.surname |