# `min`

## Description

Returns the smallest numerical value from the input.

- Can be used in aggregation to compute the minimum value across grouped rows.
- When used with multiple arguments, returns the smallest among them.

## Syntax

```dataprime
min(value: number, ...values: number): number
```

## Arguments

| Name      | Type   | Required | Description                                        |
| --------- | ------ | -------- | -------------------------------------------------- |
| value     | number | **true** | The first numerical value to compare               |
| ...values | number | **true** | One or more additional numerical values to compare |

## Example

**Use case: Find the quickest latency per path**

Suppose you want to identify which spans have the shortest duration.

### Example data

```json
{ "applicationName": "default", "duration": 4 },
{ "applicationName": "default", "duration": 25 },
{ "applicationName": "074157727657", "duration": 14 },
{ "applicationName": "074157727657", "duration": 90 },
{ "applicationName": "streaming-platform", "duration": 81 },
{ "applicationName": "web-app", "duration": 1000 },
{ "applicationName": "docs", "duration": 2000 },
{ "applicationName": "checkout", "duration": 4500 },
{ "applicationName": "checkout", "duration": 7000 },
{ "applicationName": "search", "duration": 3200 }
```

### Example query

```dataprime
source spans
| bottom 10 $l.applicationName by min($m.duration)
```

### Example output

| applicationName    | \_min0 |
| ------------------ | ------ |
| default            | 4      |
| 074157727657       | 14     |
| streaming-platform | 81     |
| web-app            | 1000   |
| docs               | 2000   |
