Berserk Docs
Aggregate FunctionsMake / Collect

first

Returns the value of the expression from the row with the earliest timestamp.

Syntax

first(expr)

Parameters

Prop

Type

Returns: any

Examples

Example 1

datatable(region:string, $time:datetime, raid:string)[
  "England", datetime(2024-06-08), "Lindisfarne",
  "England", datetime(2024-11-01), "York",
  "Francia", datetime(2024-03-28), "Paris"
]
| summarize first(raid) by region
region (string)$time (dynamic)raid (dynamic)
England2024-06-08T00:00:00Z"Lindisfarne"
Francia2024-03-28T00:00:00Z"Paris"

On this page