What is the name and id of the department with the most number of degrees ?
CREATE TABLE degree_programs (department_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR)
SELECT TOP 1 t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE degree_programs (department_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR) Question: What is the name and id of the department with the most number of degrees ? [/INST] SELECT TOP 1 t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC </s>