CREATE TABLE view_unit_status (apt_id NUMBER, apt_booking_id NUMBER, status_date TIME, available_yn others)
CREATE TABLE apartment_bookings (apt_booking_id NUMBER, apt_id NUMBER, guest_id NUMBER, booking_status_code CLOB, booking_start_date TIME, booking_end_date TIME)
CREATE TABLE guests (guest_id NUMBER, gender_code CLOB, guest_first_name CLOB, guest_last_name CLOB, date_of_birth TIME)
CREATE TABLE apartments (apt_id NUMBER, building_id NUMBER, apt_type_code CLOB, apt_number CLOB, bathroom_count NUMBER, bedroom_count NUMBER, room_count CLOB)
CREATE TABLE apartment_facilities (apt_id NUMBER, facility_code CLOB)
CREATE TABLE apartment_buildings (building_id NUMBER, building_short_name CLOB, building_full_name CLOB, building_description CLOB, building_address CLOB, building_manager CLOB, building_phone CLOB)

Find the total number of rooms in the apartments that have facility code 'Gym'.
SELECT SUM(T2.room_count) FROM apartment_facilities AS T1 JOIN apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym"
SELECT SUM("T2"."room_count") FROM "apartment_facilities" "T1" JOIN "apartments" "T2" ON "T1"."apt_id" = "T2"."apt_id" WHERE "Gym" = "T1"."facility_code"