What is the name of department where has the largest number of professors with a Ph.D. degree?
CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
SELECT TOP 1 T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR) Question: What is the name of department where has the largest number of professors with a Ph.D. degree? [/INST] SELECT TOP 1 T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC </s>