- 1
- 2
- 3
SELECT g.name, (
SELECT (SELECT json_agg(b) users FROM (SELECT array_agg(a) result FROM (SELECT u.id, getimage(ARRAY[u.avatar_id]), gu.role FROM sys_users u INNER JOIN groups_users gu ON u.id = gu.user_id AND gu.group_id = g.id) a) b)
)->0->'result' users FROM groups g WHERE url = 'test'
inkanus-gray 07.02.2017 18:40 # 0
Stefan_Hitskov 08.02.2017 01:21 # +2
inkanus-gray 08.02.2017 11:13 # 0
defecate-plusplus 08.02.2017 11:36 # +1
barop 08.02.2017 23:17 # +1