> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for BOOL_OR

# BOOL_OR

Returns true if any non NULL input value is true, otherwise false. If all input values are NULL values, returns NULL.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
BOOL_OR(<expression>) [FILTER ([WHERE] <condition>)]
```

## Parameters

| Parameter      | Description                                                       | Supported input types |
| :------------- | :---------------------------------------------------------------- | :-------------------- |
| `<expression>` | The boolean expression used to calculate the result               | `BOOLEAN`             |
| `<condition>`  | An optional boolean expression to filter rows used in aggregation | `BOOL`                |

## Return Types

`BOOLEAN`

## Example

The following query shows the tournaments with the highest prize amounts in the `tournaments` table:

<div className="query-window">
  ```
  SELECT name, totalprizedollars FROM tournaments ORDER BY totalprizedollars DESC LIMIT 5;
  ```

  | name <span>text null</span> | totalprizedollars <span>int null</span> |
  | :-------------------------- | :-------------------------------------- |
  | The Drifting Thunderdome    | 24768                                   |
  | The Talladega Thrill        | 24747                                   |
  | The Elite Speed Demons Cup  | 24346                                   |
  | The Volcanic Venture Rally  | 24323                                   |
  | The Drifting Wasteland      | 24271                                   |

  <p><span>Rows: 5</span><span>Execution time: 6.00ms</span></p>
</div>

The following example checks whether any tournament in the `tournaments` table has a prize of more than 20,000:

<div className="query-window">
  ```
  SELECT BOOL_OR(totalprizedollars > 20000) AS has_big_prize FROM tournaments;
  ```

  | has\_big\_prize <span>boolean null</span> |
  | :---------------------------------------- |
  | True                                      |

  <p><span>Rows: 1</span><span>Execution time: 5.78ms</span></p>
</div>
