hardGrab · windowPro
Previous month's revenue
Grab wants to compare each month's revenue against the one before it.
From the monthly_revenue table, return each month, its revenue, and the previous month's revenue as prev_revenue (which is NULL for the earliest month). Order the output by month.
Schema
▸monthly_revenue
| month | DATE |
| revenue | NUMERIC(12,2) |
Pro
The example input, expected output, and walkthrough for this question unlock with a Pro plan.
Pro
This is a Pro question
Premium practice questions unlock with a Pro plan. The full solution, expected output, and grading are available to Pro members.