Min¶
Returns the smallest value among the given parameters or inputs, folding ARRAY inputs element-by-element.
Without parameters, Min selects the minimum across all available
inputs. When parameters are given, it chooses among those parameters
only.
An ARRAY input is folded element-by-element — Min compares array
contents, never an array as a whole — so scalars and arrays mix freely
in one call (e.g. Min(5, :int_array)), and
GetCDMTableId(@idx, :key)[] => Min() yields the minimum of all matched
values. The element type drives the comparison; when every input is an
ARRAY the output type defers to the destination field.
Parameters¶
- N —
candidatesOptional — accepts: field, DATE, FLOAT, INT, STRING -
The Nth candidate value. May be a field reference (scalar or ARRAY) or a static value.
Input type¶
DATEFLOATINTSTRINGARRAY
Output type¶
same-as-input
Requires¶
- All parameter types and (scalar) input types must be identical; ARRAY element types must match too.
Examples¶
Min across all inputs
Two field references
Field reference vs. static value
Lexicographic min of strings
Minimum of a collected ARRAY