Chapter 4 · Aggregations
53. Monthly Revenue Summary
Medium20 XPE-Commerce
The CFO needs a month-by-month revenue report. For each month (formatted as YYYY-MM), compute the total revenue (sum of total_amount) and the number of orders. Only include months with revenue exceeding 500. Sort chronologically.
Tables
- PKidINT
- FKcustomer_id→ customers.idINT
- order_dateTEXT
- statusTEXT
- total_amountREAL
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.