ARRAY_UNIQUE_AGG
functionsupportedCore SQL functionsReturns an ARRAY that contains all of the distinct values from the specified column.
Syntax
supportedpartialnot supportednot scored
Aggregate function
ARRAY_UNIQUE_AGG( <column> )
Window function
ARRAY_UNIQUE_AGG( <column> ) OVER ( [ PARTITION BY <expr> ] )
Parameters
| Name | Required | Description |
|---|---|---|
column | required | The column containing the values. |
Returns
The function returns an array containing the distinct values in the specified column. The values in the array are in no particular order, and the order is not deterministic. The function ignores NULL values in column. If column contains only NULL values or the table containing column is empty, the function returns an empty array.
Usage notes
- This function can be used as either of the following types of functions: aggregate function
- window function.
- When this function is called as a window function, it does not support explicit window frames.
- This function doesn’t support a structured type as an input argument.