Aggregate FunctionsArg
arg_min
Returns both the minimum value and the corresponding return expression from the row where the first expression is minimum.
Syntax
arg_min(minimize, return_expr)Parameters
Prop
Type
Returns: any
Syntax
arg_min(minimize, return_expr)Parameters
Prop
Type
Returns: any
Examples
Example 1
datatable(clan:string, warrior:string, voyages:long)[
"Lothbrok", "Ragnar", 42,
"Lothbrok", "Bjorn", 31,
"Fairhair", "Harald", 25,
"Lothbrok", "Ivar", 35
]
| summarize arg_min(voyages, warrior) by clan| clan (string) | voyages (long) | warrior (string) |
|---|---|---|
| Fairhair | 25 | Harald |
| Lothbrok | 31 | Bjorn |