RienSQL
TASK #179 · Medium · Booking.com

Revenue 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.
Expected columnscity total_revenueBooking.com
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
propertiesproperty_id, name, city, country, property_type, stars
bookingsbooking_id, property_id, user_id, check_in, check_out, total_price, status