Skip to main content
These functions can be used to convert primitive column values into arrays of those values (aggregation) or to convert array columns into columns of primitive values (unnest).

ARRAY_AGG(expr)

Combines column values within a group into a single array of those values.See examples.

ARRAY_AGG_DISTINCT(expr)

Combines column values within a group into a single array of those values, removing any duplicates.See examples.

UNNEST_JSON_ARRAY

Transposes array values into columnar data.See UNNEST_JSON_ARRAY.