SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code
How many departments are in each school?
SELECT count ( DISTINCT dept_name ) , school_code FROM department GROUP BY school_code
select count ( distinct dept_name ) , school_code from department group by school_code
How many departments are in each school ?