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 |
min (aggregate)
Returns the minimum value in each group. This is an alias for agg_min.
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