I have such a query
SELECT group_id, array_agg(element_id) FROM table
GROUP BY group_id;
As a result I have something like that:
group_id | array_agg
106 | {2147,2138,2144}
107 | {2132,2510,2139}
What query should be written, so result may be depicted in this way:
group_id | array_agg
106 | {2147
| 2138
| 2144}
107 | {2132
| 2510
| 2139}