ClickHouse/docs/en/sql-reference/aggregate-functions/reference/timeseriesgroupratesum.md
Ivan Blinkov 258d2fd499
[docs] split various kinds of CREATE queries into separate articles (#12328)
* normalize

* split & adjust links

* re-normalize

* adjust ru links

* adjust ja/tr links

* partially apply e0d19d2aea

* reset contribs
2020-07-09 18:10:35 +03:00

604 B

toc_priority
171

timeSeriesGroupRateSum

Syntax: timeSeriesGroupRateSum(uid, ts, val)

Similarly to timeSeriesGroupSum, timeSeriesGroupRateSum calculates the rate of time-series and then sum rates together. Also, timestamp should be in ascend order before use this function.

Applying this function to the data from the timeSeriesGroupSum example, you get the following result:

[(2,0),(3,0.1),(7,0.3),(8,0.3),(12,0.3),(17,0.3),(18,0.3),(24,0.3),(25,0.1)]