SQLDAXExcelPython
LeaderboardRunLifetime
Interview classicsHard30 points

Cumulative share of revenue

For each product with sales, highest revenue first, return ProductName, its total Amount, and the running share of all revenue as a decimal rounded to 4 places.

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.