min_of()
Returns the minimum value of several evaluated numeric expressions.
min_of(10, 1, -3, 17) == -3
Syntax
min_of (expr_1, expr_2 ...)
Arguments
- expr_i: A scalar expression, to be evaluated.
- All arguments must be of the same type.
- Maximum of 64 arguments is supported.
- Non-null values take precedence to null values.
Returns
The minimum value of all argument expressions.
Examples
Find the maximum value in an array:
print result=min_of(10, 1, -3, 17)
| result |
|---|
| -3 |
Find the minimum value in a data-table. Non-null values take precedence over null values:
datatable (A:int, B:int)
[5, 2,
10, 1,
int(null), 3,
1, int(null),
int(null), int(null)]
| project min_of(A, B)
| result |
|---|
| 2 |
| 1 |
| 3 |
| 1 |
| (null) |