Write a SQL query to analyze operational performance by joining transactions, members, and support cases, then aggregate by month to identify trends. Use the supplied tables and include only active members and posted transactions.
month, active_member_count, transaction_count, total_transaction_amount, avg_transaction_amount, support_case_count, and resolved_case_count.month; use zero for missing counts or totals and NULL for an unavailable transaction average.| Column | Type | Description |
|---|---|---|
| member_idPK | INT | Unique member identifier |
| member_name | VARCHAR(100) | Member display name |
| membership_status | VARCHAR(20) | Current membership status |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| member_id | INT | Member associated with the transaction |
| transaction_date | DATE | Date the transaction was recorded |
| amount | NUMERIC(12,2) | Transaction amount |
| transaction_status | VARCHAR(20) | Processing status of the transaction |
| Column | Type | Description |
|---|---|---|
| case_idPK | INT | Unique support case identifier |
| member_id | INT | Member who opened the case |
| opened_at | DATE | Date the case was opened |
| resolved_at | DATE | Date the case was resolved |
| case_status | VARCHAR(20) | Current support case status |