mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
commit
468dd76595
@ -52,15 +52,15 @@ Input table:
|
|||||||
Query:
|
Query:
|
||||||
|
|
||||||
``` sql
|
``` sql
|
||||||
SELECT argMax(user, salary), argMax(tuple(user, salary)) FROM salary;
|
SELECT argMax(user, salary), argMax(tuple(user, salary), salary), argMax(tuple(user, salary)) FROM salary;
|
||||||
```
|
```
|
||||||
|
|
||||||
Result:
|
Result:
|
||||||
|
|
||||||
``` text
|
``` text
|
||||||
┌─argMax(user, salary)─┬─argMax(tuple(user, salary))─┐
|
┌─argMax(user, salary)─┬─argMax(tuple(user, salary), salary)─┬─argMax(tuple(user, salary))─┐
|
||||||
│ director │ ('director',5000) │
|
│ director │ ('director',5000) │ ('director',5000) │
|
||||||
└──────────────────────┴─────────────────────────────┘
|
└──────────────────────┴─────────────────────────────────────┴─────────────────────────────┘
|
||||||
```
|
```
|
||||||
|
|
||||||
[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/argmax/) <!--hide-->
|
[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/argmax/) <!--hide-->
|
||||||
|
Loading…
Reference in New Issue
Block a user