I cannot move the array_agg to around the column name. It has to work as a inner query.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных