SQLDAXExcelPython
LeaderboardRunLifetime
Subqueries and CTEsHard30 points

Customers above average spend

Work out the total Amount for each customer who has sales. Return CustomerId and that total for customers whose total is above the average of those totals.

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.