Skip to main content
Aggregate · Window
NULL inputs are ignored. All-NULL groups return NULL.

Syntax

A window function keeps each input row and adds a result for that row. PARTITION BY groups rows with matching values; without it, all input rows form one group. A frame from UNBOUNDED PRECEDING to UNBOUNDED FOLLOWING includes every row in the group.

Aggregate

Window over all rows in each group

  • Use the full-group window shown above. Other frame boundaries, ordering options, and NULL-handling clauses are outside the forms covered on this page.

Arguments

Aggregate and full-group window

Returns

  • Type: BOOLEAN
  • Possible values: TRUE, FALSE or NULL.
  • NULL behavior: NULL inputs are ignored. All-NULL groups return NULL.
  • Empty input: An empty global aggregate returns NULL.

Properties

Usage notes

  • Grouped EVERY returns the minimum BOOLEAN value: FALSE takes precedence over TRUE.
  • Deterministic: Boolean MIN/MAX is independent of input order.
  • Supports DISTINCT: Duplicate Boolean inputs cannot change the aggregate result.

Examples

Combine Boolean inputs

All NULL inputs

Limitations

  • Use the grouped aggregate or the full-group ROWS window shown here. Other window forms are outside this page’s coverage.
Last modified on October 15, 2026