SQLDAXExcelPython
LeaderboardRunLifetime
Window functionsHard30 points

Month over month change

For each month of 2024, return MonthNumber, the month's total Amount, the previous month's total, and the change between them, in month order. January has no previous month in this result, so its previous total and change are NULL.

Hard questions are part of Lifetime and Pro. Read it here, and unlock running and checking your answer from the plans.

Show solutionLifetime

Runs in your browser with DuckDB, whose SQL is close to PostgreSQL. Nothing you type is sent to a server unless you save a score.

SQLselect text to run only that part
Loading editor…

Press Ctrl+Enter or Run to see the result here.