---
title: bool_or aggregate function
description: Learn the syntax of the bool\_or function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/bool_or
---

# `bool_or` aggregate function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns `true` if at least one value in `expr` is true within the group.

The `bool_or` aggregate function is synonymous with [`any` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/any.md).

## Syntax

```
bool_or(expr) [FILTER ( WHERE cond ) ]
```

This function can also be invoked as a [window function](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-window-functions.md) using the `OVER` clause.

## Arguments

* `expr`: A BOOLEAN expression.
* `cond`: An optional boolean expression filtering the rows used for aggregation.

## Returns

A BOOLEAN.

## Examples

```sql
> SELECT bool_or(col) FROM VALUES (true), (false), (false) AS tab(col);
 true

> SELECT bool_or(col) FROM VALUES (NULL), (true), (false) AS tab(col);
 true

> SELECT bool_or(col) FROM VALUES (false), (false), (NULL) AS tab(col);
 false
```

## Related

* [`bool_and` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/bool_and.md)
* [`every` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/every.md)
* [`some` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/some.md)
* [`any` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/any.md)
* [Window functions](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-window-functions.md)
