- 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.
Syntax¶
Aggregate function
ARRAY_UNIQUE_AGG( <column> )
Window function
ARRAY_UNIQUE_AGG( <column> ) OVER ( [ PARTITION BY <expr> ] )
For details about the OVER clause, see Syntax und Verwendung von Fensterfunktionen.
Argumente¶
columnDie 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.
Diese Funktion unterstützt keine strukturierten Typen als Eingabeargument.
Beispiele¶
Aggregation¶
Siehe Verwenden von Arrays zum Berechnen diskreter Werte für hierarchische Aggregationen.