get_distinct_values
Examine the distinct values in a column and their frequency to understand data distribution before writing queries or constraints.
Instructions
Return the distinct values of a column and how many rows contain each value, ordered by frequency. Use this to understand the range of values in a column before writing WHERE clauses or CHECK constraints. Returns [{value, count}] ordered by count descending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database key from list_databases. | |
| table | Yes | Table name. Automatically uppercased. | |
| column | Yes | Column name to inspect. Automatically uppercased. | |
| limit | No | Maximum number of distinct values to return, ordered by frequency. Defaults to 20. |