BOOL_OR

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns true if at least one input value is true; otherwise returns false.

Syntax 

1bool_or(<expression>)

Arguments 

Required 

  • <expression>: An expression of type boolean.

Returns 

Returns a boolean value. Returns NULL if no rows are selected.

Considerations 

  • NULL values are ignored in the calculation.

Examples 

Check Any True 

Check if any order has an issue.

1SELECT bool_or(has_issue) AS any_issues
2FROM orders
3WHERE order_date = '2024-01-15';

Check by Group 

Find groups with at least one matching condition.

1SELECT category, bool_or(is_featured) AS has_featured_item
2FROM products
3GROUP BY category;

Related Documentation