---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ytsaurus.tech/docs/en/yql/syntax/select/distinct.md
  - https://ytsaurus.tech/docs/ru/yql/syntax/select/distinct.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ytsaurus.tech/docs/en/llms.txt

# DISTINCT

Selecting unique rows.

{% note info %}

Applying `DISTINCT` to calculated values is not currently implemented. For this purpose, use a subquery or the clause [`GROUP BY ... AS ...`](https://ytsaurus.tech/docs/en/yql/syntax/group_by.md).

{% endnote %}

## Example

```yql
SELECT DISTINCT value -- only unique values from the table
FROM my_table;
```

The `DISTINCT` keyword can also be used to apply [aggregate functions](https://ytsaurus.tech/docs/en/yql/builtins/aggregation.md) only to distinct values. For more information, see the documentation for [GROUP BY](https://ytsaurus.tech/docs/en/yql/syntax/group_by.md).

