How many buildings are there?
select count(*) from buildings
How many have a company office?
select count(distinct building_id) from office_locations
What are their building names?
select t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id group by t2.id
What are the names of the buildings other than those?
select name from buildings where id not in (select building_id from office_locations)