argMin
Calculates the arg
value for a minimum val
value. If there are several different values of arg
for minimum values of val
, returns the first of these values encountered.
Syntax
argMin(arg, val)
Arguments
arg
β Argument.val
β Value.
Returned value
arg
value that corresponds to minimumval
value.
Type: matches arg
type.
Example
Input table:
ββuserββββββ¬βsalaryββ
β director β 5000 β
β manager β 3000 β
β worker β 1000 β
ββββββββββββ΄βββββββββ
Query:
SELECT argMin(user, salary) FROM salary
Result:
ββargMin(user, salary)ββ
β worker β
ββββββββββββββββββββββββ