Aggregate · Window
NULLs are ignored. All-NULL inputs yield NULL; all non-NULL FALSE values yield FALSE.
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
- Use a frame that includes all rows in the group or starts at the first row (
UNBOUNDED PRECEDING). Sliding frames that drop earlier rows are not supported. RANGE frames with a numeric or time offset are not supported.
Window over all rows in each group
- This window form evaluates BOOLEAN values across all rows in the group. Sliding frames are not supported.
Arguments
Aggregate and window
Returns
- Type: BOOLEAN
- NULL behavior: NULLs are ignored. All-NULL inputs yield NULL; all non-NULL FALSE values yield FALSE.
- Empty input: Returns NULL on empty global aggregate or frame.
Properties
Usage notes
- In grouped calls, BOOL_OR returns the maximum BOOLEAN value: TRUE takes precedence over FALSE.
- DISTINCT has no effect on Boolean OR.
Examples
All NULL values
Boolean OR across all rows in each group
Limitations
- Use a frame that includes all rows in the group or starts at the first row (
UNBOUNDED PRECEDING). Sliding frames that drop earlier rows are not supported. RANGE frames with a numeric or time offset are not supported.
Last modified on October 15, 2026