Skip to main content Skip to complementary content

MAX_BY

Returns the value that corresponds to the maximum value of a different field in the time window.

Syntax

MAX_BY(VALUE, SORT)‌

Arguments

VALUE

Type: any

The field to return.

SORT

Type: numeric

The field to sort by.

Returns

Type: any

Returns the VALUE that corresponds to the maximum SORT value.

If the maximum value is not unique, the first VALUE in the set will be returned.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!