Your question is Conversion Rate Per City. 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.
Practo wants to compare how effectively its healthcare discovery platform converts registered users into users who make at least one booking. Write a PostgreSQL query to calculate the booking conversion rate for each user city.
users as the denominator population so cities with no bookings are included.Unknown and sort the output alphabetically by city.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique Practo user identifier |
| city | VARCHAR(100) | User's registered city |
| Column | Type | Description |
|---|---|---|
| booking_idPK | INTEGER | Unique booking identifier |
| user_id | INTEGER | User associated with the booking |