Min

min

The min function is a scalar function, which returns the minimum of its arguments. For the opposite, see max.

Spec

min(arg0, arg1, ...)

⚠️ The type of each argument must be the same. If not, this function will fail with a parse error.

Parameters

arg0 - Primitive type capable of comparison.
arg1 - Primitive type (same as arg0)
...  - Same types as arg0 and arg1

Return Value

Minimum of all arguments. Same type as arg0.

Example

range example from 1 to 5 step 1
| project min(example, 3)
min_example_const_int
1
2
3
3
3

Aggregate usage

Inside summarize, min is an alias for agg_min and returns the minimum value per group.

logs
| summarize firstSeen = min(timestamp) by host