> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/aggregation/min",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for MIN

# MIN

Returns the minimum value in its argument. `NULL` values are ignored. If all inputs are `NULL`, `MIN` returns NULL.

## Syntax

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

## Parameters

| Parameter      | Description                                                       | Supported input types |
| :------------- | :---------------------------------------------------------------- | :-------------------- |
| `<expression>` | The expression whose minimum to determine                         | Any type              |
| `<condition>`  | An optional boolean expression to filter rows used in aggregation | `BOOL`                |

## Return Types

Same as input type

## Examples

**Example**

This code example uses the following `tournaments` table:

| name                          | totalprizedollars |
| :---------------------------- | :---------------- |
| The Drift Championship        | 22,048            |
| The Lost Track Showdown       | 5,336             |
| The Acceleration Championship | 19,274            |
| The French Grand Prix         | 237               |
| The Circuit Championship      | 9,739             |

When used on the `totalprizedollars` column, `MIN` will return the smallest value.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	MIN(totalprizedollars) as minprize
FROM
	tournaments;
```

**Returns**

`237`

`MIN` can also work on text or array columns, in which case it returns the lexicographically smallest value. In this example, the function assesses the `name` column in the `tournaments` table.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	MIN(name) as mintournament
FROM
	tournaments;
```

**Returns**

`The Acceleration Championship`
