Skip to main content

deltaSum

Introduced in: v21.3.0 Sums the arithmetic difference between consecutive rows. If the difference is negative, it is ignored.
The underlying data must be sorted for this function to work properly. If you would like to use this function in a materialized view, you most likely want to use the deltaSumTimestamp function instead.
See also: Syntax
Arguments
  • x1[, x2, ...] — One or more input values. Integer or Float
Returned value Returns a gained arithmetic difference of the input values. (U)Int* or Float* Examples Basic usage with positive differences
Query
Response
Mixed values with negative differences ignored
Query
Response
Float values
Query
Response
See also
Last modified on June 19, 2026