Calculating Cumulative Sum in PostgreSQL
Calculating Cumulative Sum in PostgreSQL: a task in Terminal-Lego-15k (Harbor dataset). You need to calculate cumulative (running) sums in PostgreSQL using window functions. Given a staging table with monthly financial data, you must create a query that calculates the cumulative amount for each…
The task
You need to calculate cumulative (running) sums in PostgreSQL using window functions. Given a staging table with monthly financial data, you must create a query that calculates the cumulative amount for each `circle_id`, ordered chronologically by month within the year.
Part of PrimeIntellect/Terminal-Lego-15k.