BOOL_AND

Aggregates boolean values. It returns TRUE if all of the values in the aggregation are true and FALSE if any of them are false ignoring null values.

ParameterTypeDescription
value
boolean
The values to combine with `AND`
Returns: boolean

Example

query:

SELECT BOOL_AND(close_value > 43) AS `close value > 43`,
       sales_agent
  FROM sales_pipeline
 WHERE deal_stage = "Won"
 GROUP BY sales_agent

result:

close value > 43 sales_agent
true Maureen Marcano
false Boris Faz
true Jonathan Berthelot
true Vicki Laflamme
true Donn Cantrell
true Wilburn Farren
true Cassey Cress
false Elease Gluck