OBJECT_AGG
functionsupportedCore SQL functionsReturns one OBJECT per group. For each (key, value) input pair, where key must be a VARCHAR and value must be a VARIANT, the resulting OBJECT contains a key:value field.
Syntax
supportedpartialnot supportednot scored
Aggregate function
OBJECT_AGG(<key>, <value>)
Window function
OBJECT_AGG(<key>, <value>) OVER ( [ PARTITION BY <expr2> ] )
Usage notes
- Input tuples with NULL key and/or value are ignored.
- Duplicate keys within a group result in a Duplicate field key 'key' error.
- The DISTINCT keyword is supported, but it only filters out duplicate rows where both key and value are equal.
- When this function is called as a window function, it does not support: An ORDER BY clause within the OVER clause.
- Explicit window frames.