# min()

Returns the minimum value of a dimension or measure field.

## Example - Find the Smallest Opportunity For Each Account

```nolang
q = load "Ops";
q = group q by 'Account_Name';
q = foreach q generate 'Company' as 'Company', min('Amount') as 'Smallest Deal';
```

## Example - Find the First Value in List of Airline Destinations per Origin

For dimensions, `min()` sorts the values alphabetically and the first value is returned.

```nolang
q = load "Airlines";
q = group q by 'origin';
q = foreach q generate 'origin' as 'Origin', min('dest') as 'Min Destination';
```

**See Also**

- [max()](/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-max.md)
