Mock interview. You're interviewing for a senior analyst job on a home-sharing marketplace's quality team. The interviewer explains: "Bad stays hurt guests and the marketplace. We want to find the listings that need coaching and show what's at stake."
Use all the data. Revenue comes from confirmed bookings. Each review has stars from 1 to 5.
"For each city: listings, listings that were never booked (no confirmed bookings), confirmed revenue, and the average review stars."
Expected output
Return: city, listings, never booked, revenue and average stars (name the columns however you like)
city, listings, never_booked, revenue, avg_stars (rounded to 2 decimals); sorted by cityExample of the shape (made-up values):
| city | listings | never_booked | revenue | avg_stars |
|---|---|---|---|---|
| Rome | 60 | 10 | 150000.00 | 4.10 |
Step 1 of 4
Write your query here. Ctrl + Enter submits.