Skip to main content
All Problems
hard0% acceptance

Monthly Revenue Report with CTE

Build a monthly revenue report using a Common Table Expression. The CTE should compute monthly revenue and order count. The main query should return the month, revenue, order count, and the month-over-month revenue change.

Schema

🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute