#714

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.

revenuecourse_id
24000.0011
6000.0012
5000.5010
Skypro

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid