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.

Last updated