BOOL_AND() OVER ...

All functions > WINDOW FUNCTION > BOOL_AND() OVER ...

Returns TRUE if all boolean values in the window frame are true.

Syntax

BOOL_AND(expr) OVER ([PARTITION BY expr [, ...]] [ORDER BY sort_item [, ...]] [ROWS|RANGE|GROUPS frame])

Notes

  • Logical AND over all boolean values in the window
  • Returns FALSE if any value is false
  • NULL values are ignored
  • Returns BOOLEAN type

See also

Examples

FeatureQL
SELECT
    f1 := ZIP(ARRAY[1,2,3] AS id, ARRAY[true,false,true] AS b).TRANSFORM(SELECT BOOL_AND(b) OVER (ORDER BY id ASC)).UNWRAP() -- Running logical AND
;
Result
f1 ARRAY
[true, false, false]

Last update at: 2026/05/26 17:22:09