Max_elem
Ordering functions maximum element
syntax
- max_elem(a, b, .. , n)
definition
max_elem(a, b, .. , n) results in a Data item with the highest value of the arguments in the element-by-element comparison.
The Domain unit of the resulting item is the same as the domain units of all arguments of the function.
The Values unit of the resulting item is the values unit of all arguments of the function.
applies to
Data items with Numeric or string value type
conditions
- Domain of the arguments must match or be void.
- Arguments must have matching:
example
attribute<uint32> max_elemABC (MDomain) := max_elem(A, B, C);
| A(int32) | B(int32) | C(int32) | max_elemABC |
|---|---|---|---|
| 0 | 1 | 2 | 2 |
| 1 | -1 | 4 | 4 |
| -2 | 2 | 2 | 2 |
| 4 | 0 | 7 | 7 |
| 999 | 111 | -5 | 999 |
| 2 | null | 1 | 2 |
| 0 | 1 | null | 1 |
| null | 1 | 2 | 2 |
| null | null | null | null |
MDomain, nr of rows = 9
A Null value in one of the arguments is ignored: the result is null only if all arguments are null.