fn bool_and_append_only(state: bool, input: bool) -> bool
Expand description
Returns true if all non-null input values are true, otherwise false.
ยงExample
statement ok
create table t (b1 boolean, b2 boolean, b3 boolean, b4 boolean);
query T
select bool_and(b1) from t;
----
NULL
statement ok
insert into t values
(true, null, false, null),
(false, true, null, null),
(null, true, false, null);
query TTTTTT
select
bool_and(b1),
bool_and(b2),
bool_and(b3),
bool_and(b4),
bool_and(NOT b2),
bool_and(NOT b3)
FROM t;
----
f t f NULL f t
statement ok
drop table t;