# `MIN`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the minimum value of an expression across all input values.

## Syntax

```sql
min(<expression>)
```

## Arguments

### Required

- `<expression>`: An expression of any comparable type.

## Returns

Returns the same type as the argument. Returns NULL if no rows are selected.

## Considerations

- NULL values are ignored in the calculation.
- Works with numeric types, strings, dates, and other comparable types.
- For strings, returns the lexicographically smallest value.

## Examples

### Find Minimum Value

Get the lowest price.

```sql
SELECT min(price) AS lowest_price
FROM products;
```

### Minimum by Group

Find the minimum value per group.

```sql
SELECT category, min(price) AS min_price
FROM products
GROUP BY category;
```

### Minimum Date

Find the earliest date.

```sql
SELECT min(order_date) AS first_order
FROM orders;
```

## Related Documentation

- [MAX](/docs/data/data-cloud-query-guide/references/dc-sql-reference/max.md)
- [MIN_BY](/docs/data/data-cloud-query-guide/references/dc-sql-reference/min-by.md)
- [Aggregate Functions](/docs/data/data-cloud-query-guide/references/dc-sql-reference/aggregate.md)
