Finance Path · Mission 15 of 25Medium

Running cash burn

Window function SUM() OVER (ORDER BY ...) for cumulative totals

Back to Finance

The Brief

Sam PatelTreasury Analysttreasury

For the cash runway model — give me monthly 2025 OpEx and a running cumulative total. Columns: `month`, `monthly_opex`, `running_total`. Posted, OpEx only. This goes straight into the 13-week cash model.

You'll practice

SUM() OVERWindow frame

Tables available

fact_transactionsdim_accounts

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

First, aggregate monthly_opex per month (GROUP BY EXTRACT(MONTH ...)) for 2025.

Hint 2

Then wrap it: `SUM(monthly_opex) OVER (ORDER BY month) AS running_total`.

Hint 3

You can do it in one query with a CTE or subquery. Window + GROUP BY together usually needs a subquery wrapper.