How many apartments are there?
select count(apt_number) from apartments
What are the status codes?
select booking_status_code from apartment_bookings
How many apartments have the status code to be "Confirmed"?
select count(t2.apt_number) from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = "Confirmed"
What about that of "Provisional" or "Confirmed"?
select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = "Confirmed" intersect select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = "Provisional"