Your question is Rank Top Agents by Conversion. 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.
Write a query to rank top-performing agents based on conversion rates using dense rank window functions.
Use the provided agent and application data. Calculate each agent's conversion rate as converted applications divided by total applications.
agent_id, agent_name, total_applications, converted_applications, conversion_rate_pct, and conversion_rankconversion_rank ascending, conversion_rate_pct descending, and agent_id ascending| Column | Type | Description |
|---|---|---|
| agent_idPK | INT | Unique agent identifier |
| agent_name | VARCHAR(100) | Agent full name |
| VARCHAR(150) | Agent email address |
| Column | Type | Description |
|---|---|---|
| application_idPK | INT | Unique application identifier |
| agent_id | INT | Agent assigned to the application |
| status | VARCHAR(30) | Current application status |