Month-over-Month Revenue % Change
Problem
**[Classic — retail and e-commerce companies]**
Calculate monthly revenue and the **month-over-month percentage change**
(rounded to 2 dp; NULL for the first month). Order by month.
Tables
Example rows — the live problem includes the full dataset.
monthly_revenue
| month | revenue |
|---|
Expected output
Your answer should return 5 rows with the columns month, revenue, mom_pct_change.
Starter code (SQL)
SELECT *
FROM monthly_revenue;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock