Min

min

The min function is a scalar function, which returns the minimum of it's 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

Returns the minimum value in each group.

Syntax

min(Expression)

Used inside summarize.

Examples

Earliest event per host:

logs
| summarize firstSeen = min(timestamp) by host

Minimum value per sensor:

sensors
| summarize minValue = min(value) by sensorId