Chapter 4 · Aggregations
61. Monthly Transaction Count and Volume
Medium20 XPFinance
The operations team wants a monthly summary of transaction activity. For each month (YYYY-MM extracted from transaction_date), return the month, total number of transactions (tx_count), total amount (total_volume), and the average amount (avg_amount) rounded to 2 decimals. Sort by month.
Tables
- PKidINT
- FKaccount_id→ accounts.idINT
- transaction_dateTEXT
- typeTEXT
- amountREAL
- balance_afterREAL
- descriptionTEXT
- reference_numberTEXT
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.