sql >> Base de Datos >  >> RDS >> PostgreSQL

Postgres:columna agregada en matriz

Aquí hay una mejor solución como lo sugiere Abelisto en los comentarios:

select
  list_id,
  name,
  array_agg(game_id order by position)
from list
join list_item
using (list_id)
group by list_id, name