In DuckDB, arg_min()
is an aggregate function that finds the row with the minimum value in one column and returns the corresponding value from another column at that row. Rows where either of the first two expressions is NULL
are ignored.
In this article we explore DuckDB’s arg_min()
function with some simple examples.