v.21.3New Feature

Add deltaSum Aggregate Function for Summing Row Differences

Add aggregate function deltaSum for summing the differences between consecutive rows. #20057 (Russ Frank).
Introduces the aggregate function deltaSum that computes the sum of differences between consecutive rows in a dataset.

Why it matters

The deltaSum function addresses the need to efficiently calculate cumulative changes or increments between sequential data points, simplifying time series analysis and similar use cases where tracking differences is essential.

How to use it

Use the deltaSum aggregate function in your SELECT queries to sum up the differences between consecutive rows. For example:
SELECT deltaSum(column_name) FROM table_name;