argMin
Syntax: argMin(arg, val)
Calculates the arg
value for a minimal val
value. If there are several different values of arg
for minimal values of val
, the first of these values encountered is output.
Example:
┌─user─────┬─salary─┐
│ director │ 5000 │
│ manager │ 3000 │
│ worker │ 1000 │
└──────────┴────────┘
SELECT argMin(user, salary) FROM salary
┌─argMin(user, salary)─┐
│ worker │
└──────────────────────┘
当前内容版权归 ClickHouse 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ClickHouse .