Revenue by course in the last month
Revenue by course in the last month
Skypro's finance team closes the books and wants per-course revenue for the previous full calendar month. Today is fixed at 2024-04-15, so 'last month' = March 2024. Payment price is NUMERIC(15,2), order time is TIMESTAMPTZ in Europe/Moscow.
Sum course revenue across 2024-03-01..2024-03-31 inclusive (Moscow local time). Highest-grossing courses come first.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.
| course_id | revenue |
|---|---|
| 11 | 24000.00 |
| 12 | 6000.00 |
| 10 | 5000.50 |
Skypro
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid