HelloFresh marketing teams need a monthly view of campaign performance across acquisition channels. Write a PostgreSQL query that combines campaign metadata with daily campaign metrics.
Unknown.NULL when a ratio cannot be calculated.| Column | Type | Description |
|---|---|---|
| campaign_idPK | INT | Unique campaign identifier |
| campaign_name | VARCHAR(100) | HelloFresh campaign name |
| channel | VARCHAR(50) | Marketing acquisition channel |
| Column | Type | Description |
|---|---|---|
| metric_idPK | INT | Unique daily metric identifier |
| campaign_id | INT | References campaigns.campaign_id |
| metric_date | DATE | Date represented by the metrics |
| impressions | INT | Number of delivered impressions |
| clicks | INT | Number of campaign clicks |
| conversions | INT | Number of attributed conversions |
| spend | DECIMAL(10,2) | Advertising spend |
| revenue | DECIMAL(10,2) | Attributed revenue |