Description
Returns TRUE if all values in a group are true
Aliases: LOGICAL_AND — equivalent spellings; same function and parameters.
Syntax
BOOLAND_AGG(expression)
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| expression | Column or expression to evaluate | Boolean | Yes |
Notes
- When used as a window aggregate, include an
OVER (...)clause. - Use
QUALIFY(notWHERE) to filter rows based on a window calculation.
Example
SELECT
department, LOGICAL_AND(is_active) OVER (PARTITION BY department ORDER BY start_date) AS all_active
FROM
rippling.employee.Employee;