ARRAY_AGG() OVER ...
All functions > WINDOW FUNCTION > ARRAY_AGG() OVER ...
Returns an array of all values in the window frame.
Syntax
Diagram(
Sequence(
Terminal("ARRAY_AGG"),
Terminal("("),NonTerminal('expr'),Terminal(")"),
Terminal("OVER"),
Terminal("("),
NonTerminal("over_clause"),
Terminal(")"),
)
)| Parameter | Type | Required | Description |
|---|---|---|---|
expr | EXPRESSION | Yes | Expression to aggregate into an array |
over_clause | OVER CLAUSE | Yes | OVER (PARTITION BY ... ORDER BY ... [FRAME ...]) |
Notes
- Collects all values from the window frame into an array
- ORDER BY determines the order of elements in the array
- NULL values are included in the array
- Returns ARRAY type with element type matching input