Weijun-H opened a new issue, #12253: URL: https://github.com/apache/datafusion/issues/12253
### Is your feature request related to a problem or challenge? Description | Finds the row with the minimum val. Calculates the arg expression at that row. This function is affected by ordering. -- | -- Example | min_by(A, B) Alias(es) | argMin(arg, val), arg_min(arg, val) ### Describe the solution you'd like ```sql D SELECT min_by(x, y) FROM VALUES ('a', 10), ('b', 50), ('c', 20) AS tab(x, y); ┌──────────────┐ │ min_by(x, y) │ │ varchar │ ├──────────────┤ │ a │ └──────────────┘ ``` ### Describe alternatives you've considered _No response_ ### Additional context https://duckdb.org/docs/sql/functions/aggregates#min_byarg-val https://docs.databricks.com/en/sql/language-manual/functions/min_by.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org