---
schema_version: "1"
id: 2da05fced50e3ac310492bbd05f07060c2754e51aa3367ac5f72aeaef9510415
title: MIN
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/aggregate-func/min.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/min.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e22f74ff262f64cd1df1426d94bffb5add88f596a8bc7923dc58fd831148399d
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `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](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/max.md)
- [MIN_BY](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/min-by.md)
- [Aggregate Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/aggregate.md)
