Question: What building has a gym? | Do you mean the building ids of buildings with apartments that have gyms? | Yes please.
SQL: SELECT T2.building_id FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id   =   T2.apt_id WHERE T1.facility_code   =   "Gym"