Write a SQL query using joins and aggregations to summarize customer transactions by month.
Use the customer and transaction records provided. Include only customers with at least one transaction.
customer_id, customer_name, transaction_month, transaction_count, and total_amountcustomer_id, then transaction_month ascending| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's full name |
| segment | VARCHAR(30) | Customer segment |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| customer_id | INT | Customer associated with the transaction |
| transaction_date | DATE | Date the transaction occurred |
| amount | NUMERIC(12,2) | Transaction amount |