EVERY

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns true if all input values are true; otherwise returns false. Equivalent to BOOL_AND.

Syntax 

1every(<expression>)

Arguments 

Required 

  • <expression>: An expression of type boolean.

Returns 

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

Considerations 

  • Equivalent to BOOL_AND.
  • NULL values are ignored in the calculation.

Examples 

Check All Conditions 

Check if every product is in stock.

1SELECT every(in_stock) AS all_in_stock
2FROM products
3WHERE category = 'Electronics';

Validate by Group 

Ensure all items in each group meet a condition.

1SELECT vendor_id, every(is_verified) AS all_verified
2FROM products
3GROUP BY vendor_id;

Related Documentation