BOOL_OR

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

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

Example

query:

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

result:

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