Returns the last value in each ts
time window. Or if no time window is provided it just returns the last value of the series.
last([ts])
Arguments | Description |
---|---|
ts (optional) | Time window. |
An integer, float or string value depending on the series data type.
# Select the last value from 'series-001'
select last() from 'series-001'
# Select the last value per day from 'series-001'
select last(1d) from 'series-001'
# Select the last value in 2017 from 'series-001'
select last() from 'series-001' before '2018'