- 类别:
聚合函数 (Counting Distinct Values) , Window functions (Semi-structured Data Aggregation)
ARRAY_UNIQUE_AGG¶
返回一个 ARRAY,其中包含指定列中的所有非重复值。
- 另请参阅:
语法¶
Aggregate function
ARRAY_UNIQUE_AGG( <column> )
Window function
ARRAY_UNIQUE_AGG( <column> ) OVER ( [ PARTITION BY <expr> ] )
For details about the OVER clause, see 窗口函数的语法和用法.
实参¶
column包含值的列。
返回¶
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.
使用说明¶
此函数不支持将 结构化类型 作为输入实参。
示例¶
聚合¶
请参阅 使用数组计算分层聚合的非重复值。