TASK #179 · Medium · Booking.comRevenue per City
Your brief
The bookings table stores reservations of the accommodations
from properties. Consider only completed bookings
(status = 'completed').
Write a query that returns city and total_revenue (the total price of completed bookings in that city). Sort by total_revenue descending.
Write a query that returns city and total_revenue (the total price of completed bookings in that city). Sort by total_revenue descending.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
propertiesproperty_id, name, city, country, property_type, starsbookingsbooking_id, property_id, user_id, check_in, check_out, total_price, status