Berserk Docs
Aggregate FunctionsStatistical

take_anyif

Returns an arbitrary non-null value from the group for which the predicate is true.

Syntax

take_anyif(val, predicate)

Parameters

Prop

Type

Returns: any

Examples

Example 1

datatable(saga:string, clan:string)[
  "Ragnar raids England", "Lothbrok",
  "Bjorn sails west", "Lothbrok",
  "Harald unites Norway", "Fairhair"
]
| summarize take_anyif(saga, saga has "raids") by clan
clan (string)take_anyif_saga (dynamic)
Fairhairnull
Lothbrok"Ragnar raids England"

On this page