Your question is Analyze Monthly Revenue Trends by Product 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.
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 |