Your question is Running Totals of Marketing Spend. Start with the requirements and the two tables 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.
Cendyn marketing analysts use eInsight campaign data to monitor spend throughout a reporting period. Write a PostgreSQL query that calculates daily spend and the cumulative marketing spend across eligible eInsight campaigns in January 2025.
marketing_spend to campaigns and include only active campaigns whose product is eInsight.| Column | Type | Description |
|---|---|---|
| campaign_idPK | INT | Unique campaign identifier |
| campaign_name | VARCHAR(100) | Campaign name |
| product | VARCHAR(50) | Cendyn product associated with the campaign |
| channel | VARCHAR(50) | Marketing channel |
| status | VARCHAR(20) | Campaign lifecycle status |
| Column | Type | Description |
|---|---|---|
| spend_idPK | INT | Unique spend record identifier |
| campaign_id | INT | Campaign associated with the spend |
| spend_date | DATE | Date the spend was recorded |
| amount | DECIMAL(12,2) | Marketing spend amount |