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

# Distinct values

> Improve accuracy by storing unique string values of a column.

## What is distinct values?

Distinct values is a feature that stores unique string values of a column. It essentially run the following SQL:

```sql theme={null}
SELECT DISTINCT <column_name> FROM <table_name> LIMIT 50
```

It is useful when you have a column with a limited number of unique values, such as a column with country names or product categories. By storing unique values, distinct values can **improve the accuracy** of your model and reduce the memory usage.

<Tip>
  Currently the maximum number of distinct values that can be stored is **50**.
</Tip>

## Example

If a user asks `what is the average salary of software engineers in the U.S.?`, the AI model may generate the following SQL

AI-generated SQL **without** distinct values:

```sql theme={null}
SELECT * FROM salaries
WHERE country = 'U.S.'
```

<Warning>
  The AI model may not be aware that 'U.S.' and 'United States' are the same
  country. As a result, the query may not return the correct results.
</Warning>

AI-generated SQL **with** distinct values:

```sql theme={null}
SELECT * FROM salaries
WHERE country = 'United States'
```

<Check>
  By using distinct values, the AI model improves the accuracy of the where
  clause.
</Check>
