Which building does the instructor who teaches the most number of courses live in?
CREATE TABLE COURSE (Instructor VARCHAR); CREATE TABLE FACULTY (Building VARCHAR, FacID VARCHAR)
SELECT TOP 1 T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE COURSE (Instructor VARCHAR); CREATE TABLE FACULTY (Building VARCHAR, FacID VARCHAR) Question: Which building does the instructor who teaches the most number of courses live in? [/INST] SELECT TOP 1 T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC </s>