bool_and

Contents

bool_and#

bool_and(input)[source]#

Returns true if all non-null elements in the input expression are true, false if any are false, and null if all elements are null.

Example:

SQL#
SELECT bool_and(x) FROM tbl
Input#
╭─────────╮
│ x       │
│ ---     │
│ Boolean │
╞═════════╡
│ true    │
├╌╌╌╌╌╌╌╌╌┤
│ true    │
├╌╌╌╌╌╌╌╌╌┤
│ null    │
╰─────────╯
(Showing first 3 of 3 rows)
Output#
╭─────────╮
│ x       │
│ ---     │
│ Boolean │
╞═════════╡
│ true    │
╰─────────╯
(Showing first 1 of 1 rows)