Day-over-day change in order volume
For each day, show the order count and how it changed compared to the previous day (current day's orders minus the previous day's orders). The very first day has no previous day, so its change should be NULL.
Return order_date, orders, and change_from_prev, ordered by date.
Schema
| order_date | DATE |
| orders | INT |
Basic
The example input, expected output, and walkthrough for this question unlock with a Basic plan.
Basic
The reference solution and walkthrough for this question unlock with a Basic plan.
Basic
This is a Basic question
Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.
RM 25/mo · cancel anytime