-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
Description | Finds the row with the maximum val. Calculates the arg expression at that row. This function is affected by ordering. |
---|---|
Example | max_by(A, B) |
Alias(es) | argMax(arg, val), arg_max(arg, val) |
Describe the solution you'd like
D SELECT max_by(x, y) FROM VALUES ('a', 10), ('b', 50), ('c', 20) AS tab(x, y);
┌──────────────┐
│ max_by(x, y) │
│ varchar │
├──────────────┤
│ b │
└──────────────┘
Describe alternatives you've considered
No response
Additional context
https://duckdb.org/docs/sql/functions/aggregates#max_byarg-val
https://docs.databricks.com/en/sql/language-manual/functions/max_by.html
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request