ArrayAgg joins a given column's row values into a single array (eg ["apple", "cherry", "banana"]). Each group of values within a column will be aggregated into an individual array.

Requirements

  • This function is only available for Snowflake connections. 

Usage

ArrayAgg(value)

value (required) The column of values that you would like to combine.

Usage Tips

  • Sorting: Sort the initial input column of values to subsequently sort the resulting aggregated array. If no sort is applied to the initial column, the resulting array's order of values will be unpredictable. 

Example

ArrayAgg([Email])

Within each [Company] group, values from the column [Emails] are aggregated into an array of emails.

Screen_Shot_2020-10-08_at_12.37.38_PM.png

See Also

ListAgg
Concat


Was this page helpful?
Yes No