Write a SQL query that returns each month alongside its sales amount and
the cumulative (running) total up to that month, ordered chronologically.
Table: `sales`
| id | month | amount |
|---|---|---|
| 1 | 2024-01 | 100 |
| 2 | 2024-02 | 150 |
| 3 | 2024-03 | 200 |
| 4 | 2024-04 | 120 |
Expected output (columns: month, amount, running_total)
2024-01|100|100
2024-02|150|250
2024-03|200|450
2024-04|120|570Hint — use
SUM(amount) OVER (ORDER BY month)as a window function.
Sample tests