SQLDAXExcelPython
Leaderboard
Interview classicsMedium20 points

Pivot with conditional aggregation

Return one row per customer Region with total Amount in three columns: 2023, 2024 and 2025.

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.