Which schools have participated in a basketball match?
select school from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id
How many are there?
select count(school) from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id
How about the schools that have not participated in a basketball match?
select school from university where school_id not in (select school_id from basketball_match)
How many are there?
select count(*) from university where school_id not in (select school_id from basketball_match)