Tipping habits by city
MediumDoorDashcase whenratiosjoins· 20 XP
DoorDash's courier team wants to know how tips differ between cities, to explain why couriers prefer some cities.
For delivered orders, show per restaurant city the percentage of orders with no tip, a small tip (under 15% of order_total) and a generous tip (15% or more).
Expected output
- Percentages of that city's delivered orders, rounded to 1 decimal; any row order
Example of the shape (made-up values):
| city | no_tip_pct | small_tip_pct | generous_tip_pct |
|---|---|---|---|
| Lakeside | 34.0 | 20.5 | 45.5 |
Hints, the later questions and the answer come with Pro.
Write your query here. Ctrl + Enter submits.