How many different types of schools are there?
select count(distinct type) from school
For each type, how many schools are there?
select type, count(*) from school group by type
Which types have two schools?
select type from school group by type having count(*) = 2