カテゴリ:

集計関数 (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.

使用上の注意

  • この関数は、次に挙げる型の関数のいずれかとして使用できます。

  • この関数がウィンドウ関数として呼び出される場合、明示的なウィンドウフレームはサポートされません。

  • この関数は、入力引数として 構造化タイプ をサポートしていません。

集計

配列の使用による、階層的な集計の異なる値の計算 をご参照ください。