MIN_BY

The value correlating to the maximum sort in the time window.

Syntax

MIN_BY(VALUE, SORT)

Arguments

VALUE: An expression of any type. SORT: An integer type that can be ordered. ‌

Returns

The result type matches the VALUE type. If the minimum per value is not unique, the first VALUE in the set will be returned.

Example

Data

[
   {
      "user":"A01",
      "level":1,
      "score":25
   },
   {
      "user":"A01",
      "level":2,
      "score":48
   },
   {
      "user":"A01",
      "level":2,
      "score":81
   },
   {
      "user":"B02",
      "level":1,
      "score":23
   },
   {
      "user":"B02",
      "level":1,
      "score":29
   }
]

Query

Results

MAX_BY MIN MIN_EACH MIN_TIME_SERIES

Dialog

Last updated

Was this helpful?