How many classrooms have capacity greater than 50?
select count(*) from classroom where capacity > 50
Count these by building.
select count(*), building from classroom where capacity > 50 group by building