Google Ads managers need to see which campaigns are most efficient. The conversion rate is defined as the percentage of clicks that result in a conversion.
Write an SQL query to calculate the conversion rate for each campaign.
| campaign_id(INTEGER) | campaign_name(VARCHAR) |
|---|---|
| 1 | Search_Tech |
| 2 | Display_Fashion |
| 3 | Video_Games |
| event_id(INTEGER) | campaign_id(INTEGER) | event_type(VARCHAR) |
|---|---|---|
| 1 | 1 | click |
| 2 | 1 | click |
| 3 | 1 | conversion |
| 4 | 2 | click |
| 5 | 2 | click |
| 6 | 3 | click |
| campaign_name(VARCHAR) | conversion_rate(DECIMAL) |
|---|---|
| Search_Tech | 50 |
| Display_Fashion | 0 |
| Video_Games | 0 |