---
schema_version: "1"
id: b548b62d9d771e1978d7f3b3b7a13c4e9ff30d9e9afe4ee81505aa655755434f
title: BOOL_AND
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/aggregate-func/bool-and.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/bool-and.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3e4b9ceaf1b3d4062b5063a96c311f2c0fefcfea4786be3b53f1ee3e2cc4dfe7
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `BOOL_AND`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns true if all input values are true; otherwise returns false.

## Syntax

```sql
bool_and(<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.
- Equivalent to the `EVERY` function.

## Examples

### Check All True

Check if all orders are shipped.

```sql
SELECT bool_and(is_shipped) AS all_shipped
FROM orders
WHERE order_date = '2024-01-15';
```

### Validate by Group

Check conditions for each group.

```sql
SELECT department, bool_and(is_active) AS all_active
FROM employees
GROUP BY department;
```

## Related Documentation

- [BOOL_OR](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/bool-or.md)
- [EVERY](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/every.md)
- [Aggregate Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/aggregate.md)
