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(")"),
  )
)
ParameterTypeRequiredDescription
exprEXPRESSIONYesExpression to aggregate into an array
over_clauseOVER CLAUSEYesOVER (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
Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19