Airbnb wants to see which listings convert views into bookings. For July 2025, a listing's conversion rate is its July bookings divided by its July views, times 100. Views and bookings are counted independently by their own timestamps. Listings with no July views are left out. Listings with views but no bookings show 0. Write an SQL query that returns listing_id, views, bookings and ctr_pct rounded to 2 decimal places. Order the results by ctr_pct descending, then listing_id ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.