BOOL_OR() OVER ...
All functions > WINDOW FUNCTION > BOOL_OR() OVER ...
Returns TRUE if any boolean value in the window frame is true.
Syntax
BOOL_OR(expr) OVER ([PARTITION BY expr [, ...]] [ORDER BY sort_item [, ...]] [ROWS|RANGE|GROUPS frame])
Notes
- Logical OR over all boolean values in the window
- Returns TRUE if any value is true
- NULL values are ignored
- Returns BOOLEAN type
See also
Examples
FeatureQL
SELECT
f1 := ZIP(ARRAY[1,2,3] AS id, ARRAY[true,false,false] AS b).TRANSFORM(SELECT BOOL_OR(b) OVER (ORDER BY id ASC)).UNWRAP() -- Running logical OR
;Result
| f1 ARRAY |
|---|
| [true, true, true] |