PostgreSQL · Function
array_agg
array_agg collects input values, including nulls, into an array. You can control the element order with ORDER BY inside the aggregate call.
Last updated
Syntax
array_agg(anynonarray ORDER BY input_sort_columns) → anyarray
array_agg(anyarray ORDER BY input_sort_columns) → anyarrayIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
coalescearray_to_stringarray_upperstring_to_arrayunnest