SQL exercise · about 5 minutes · free
Revenue by Month
'How did we do last month?' is the most common question an analyst gets. It starts with grouping by month.
Dates are often stored as text like 2026-03-15. In SQLite, strftime('%Y-%m', order_date) turns a date into its month, and you can group by that.
Your quest: Show each
month (YYYY-MM) and its total revenue as revenue from orders, oldest month first.Starter code
-- group orders by month -- Run this first to see the orders table, then change it to answer the task. SELECT * FROM orders LIMIT 5;