SQLDAXExcelPython
LeaderboardRunLifetime
Window functionsHard30 points

Three month moving average

For each month of 2024, return MonthNumber, the month's total Amount, and the average of that month and the two months before it within 2024, rounded to 2 decimals, in month order. January averages one month and February averages two.

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.