Your question is SQL Join for Campaign and Conversion. Start with the requirements and the three 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.
Andreessen Horowitz uses campaign performance data to evaluate outreach across its founder, technology, and investment content. Write a PostgreSQL query that joins campaign touchpoints with customer conversion records and reports performance for campaigns launched in Q1 2025.
0.00 for campaigns with no reached customers. Sort by conversion rate descending, then campaign ID.| Column | Type | Description |
|---|---|---|
| campaign_idPK | INT | Unique campaign identifier |
| campaign_name | VARCHAR(100) | Campaign name |
| channel | VARCHAR(40) | Marketing channel |
| launch_date | DATE | Campaign launch date |
| budget | DECIMAL(12,2) | Campaign budget |
| Column | Type | Description |
|---|---|---|
| touch_idPK | INT | Unique touchpoint identifier |
| campaign_id | INT | References campaigns.campaign_id |
| customer_id | INT | Customer receiving the touch |
| touched_at | DATE | Date of the campaign touch |
| Column | Type | Description |
|---|---|---|
| conversion_idPK | INT | Unique conversion identifier |
| customer_id | INT | Customer who converted |
| conversion_date | DATE | Date of conversion |
| conversion_type | VARCHAR(40) | Type of conversion |