Your question is Monthly Complaint Trend by Category. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You are given complaint records from athenaOne support operations. Write a query to calculate the monthly trend in customer complaints by category, returning one row per complaint category and month with the total number of complaints filed in that month. Use the complaint submission date to derive the month, and sort the results by month and category.
| Column | Type | Description |
|---|---|---|
| complaint_idPK | INT | Unique complaint record ID |
| customer_id | INT | Customer account identifier |
| complaint_category | VARCHAR(50) | Complaint category |
| complaint_date | DATE | Date the complaint was submitted |
| complaint_status | VARCHAR(20) | Current complaint status |