> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Documentation for ALL Clause

# ALL Clause

If there are multiple matching rows in a table, then `ALL` returns all of them. `SELECT ALL` is identical to `SELECT` without `DISTINCT`. If both `ALL` and `DISTINCT` are specified, then an exception will be thrown.

`ALL` can be specified inside aggregate functions, although it has no practical effect on the query's result.

For example:

```sql theme={null}
SELECT sum(ALL number) FROM numbers(10);
```

Is equivalent to:

```sql theme={null}
SELECT sum(number) FROM numbers(10);
```
