Explain how you would write a SQL query to identify the top-performing marketing acquisition channels based on customer conversion rates over the last quarter at Private Client Select.
Use the provided acquisition channel and lead data. A lead is converted when converted_at is not null. Return the top three ranks, including ties.
channel_name, total_leads, converted_leads, conversion_rate, and performance_rank.| Column | Type | Description |
|---|---|---|
| channel_idPK | INT | Unique acquisition channel identifier |
| channel_name | VARCHAR(100) | Marketing acquisition channel name |
| Column | Type | Description |
|---|---|---|
| lead_idPK | INT | Unique lead identifier |
| channel_id | INT | Acquisition channel associated with the lead |
| lead_created_at | DATE | Date the lead entered the marketing funnel |
| converted_at | DATE | Date the lead converted to a customer |