Berserk Docs
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

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 (dynamic)warrior (dynamic)
Fairhair25"Harald"
Lothbrok31"Bjorn"

On this page