How many rooms are there in total?
select sum(room_count) from apartments
Show all the booking status codes and number of apartments for each.
select booking_status_code, count(*) from apartment_bookings group by booking_status_code
What about the average room count of the apartments that have booking status code "Confirmed"?
select avg(room_count) from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = "Confirmed"
What about the booking status code "Provisional"?
select avg(room_count) from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = "Provisional"