SQLDAXExcelPython
Leaderboard
Interview classicsMedium20 points

Percent of total with a window

For each customer Region, return its total Amount and its share of all revenue as a decimal rounded to 4 places, without a subquery.

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.