Kategorien:

Aggregatfunktionen (Counting Distinct Values) , Window functions (Semi-structured Data Aggregation)

ARRAY_UNIQUE_AGG

Gibt ein ARRAY zurück, das alle diskreten Werte der angegebenen Spalte enthält.

Siehe auch:

Verwenden von Arrays zum Berechnen diskreter Werte für hierarchische Aggregationen

Syntax

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 Syntax und Verwendung von Fensterfunktionen.

Argumente

column

Die Spalte, die die Werte enthält.

Rückgabewerte

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.

Nutzungshinweise

  • Diese Funktion kann als eine der folgenden Typen von Funktionen verwendet werden:

  • Wenn diese Funktion als Fensterfunktion aufgerufen wird, unterstützt sie keine expliziten Fensterrahmen.

Beispiele

Aggregation

Siehe Verwenden von Arrays zum Berechnen diskreter Werte für hierarchische Aggregationen.