Find the number of departments in each school.
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR) Question: Find the number of departments in each school. [/INST] SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code </s>