A financial analytics platform needs to analyze revenue trends by product category over the past year. Write a SQL query to calculate the monthly total revenue for each category, along with the cumulative revenue for each category ordered by month.
category and transaction_monthcategory and transaction_month| Column | Type | Description |
|---|---|---|
| idPK | INT | Primary key |
| category | VARCHAR | Product category |
| transaction_date | DATE | Date of transaction |
| amount | DECIMAL | Transaction amount |