类别:

聚合函数 (Counting Distinct Values) , Window functions (Semi-structured Data Aggregation)

ARRAY_UNIQUE_AGG

返回一个 ARRAY,其中包含指定列中的所有非重复值。

另请参阅:

使用数组计算分层聚合的非重复值

语法

Aggregate function

ARRAY_UNIQUE_AGG( <column> )
Copy

Window function

ARRAY_UNIQUE_AGG( <column> ) OVER ( [ PARTITION BY <expr> ] )
Copy

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.

使用说明

  • 该函数可用作以下任一类型的函数:

  • 当此函数作为窗口函数调用时,它不支持显式窗口框架。

示例

聚合

请参阅 使用数组计算分层聚合的非重复值

语言: 中文