Aggregate A Column Into An Array
PostgreSQL's array_agg
function can be used to aggregate a column into an array. Consider the following column:
By wrapping the array_agg
aggregate function around num
we are able to aggregate the values in that column into an array, like so:
See the docs on aggregate functions for more details.
Last updated