Skip to main content

timeSeriesGroupArray

Introduced in: v25.8.0 Sorts time series data by timestamp in ascending order. The samples can be passed in one of three forms:
  • as two arguments timestamp and value, where each row holds a single sample;
  • as two arrays of timestamps and values, where each row holds a whole time series;
  • as a single array of (timestamp, value) tuples, where each row holds a whole time series. This form has the same type as the result, which allows using the function in the SimpleAggregateFunction data type.
If several samples have the same timestamp, only one of them is used: the sample with the greatest value. A NaN value loses to any other value, so a NaN value is used only if all samples at this timestamp are NaN.
This function is experimental, enable it by setting allow_experimental_time_series_aggregate_functions=true.
Syntax
Arguments Returned value Returns an array of tuples (timestamp, value) sorted by timestamp in ascending order. Array(Tuple(T1, T2)) Examples Basic usage with individual values
Query
Response
Passing multiple samples of timestamps and values as arrays of equal size
Query
Response
Last modified on September 2, 2026