aherntech/sparc huggingface dataset:
Database: hr_1
Question sequence:
Who are the employees working in the Finance department?
What are their first names and job ids?
SQL query sequence:
SELECT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T2.department_name  =  'Finance'
SELECT T1.first_name ,  T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T2.department_name  =  'Finance'
Final question: Give the first name and job id for all employees in the Finance department.
Final SQL: SELECT T1.first_name ,  T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T2.department_name  =  'Finance'
Database: hr_1
Question sequence:
What is the lowest salary across all employees?
Which employees make more than that?
Of those, which make less than 2500?
SQL query sequence:
SELECT MIN(salary) FROM employees
SELECT * FROM employees WHERE salary  >  (SELECT MIN(salary) FROM employees)
SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500
Final question: What is all the information regarding employees with salaries above the minimum and under 2500?
Final SQL: SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500
Database: hr_1
Question sequence:
What are the department ids with managers who have ids between 100 and 200?
What is all the information about employees who do not work in those departments?
SQL query sequence:
SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200
SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)
Final question: What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?
Final SQL: SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)
Database: hr_1
Question sequence:
What are the department ids for departments that have someone with the first name Clara?
What is all the information about employees in those departments?
What are the full names and hire dates of those employees?
SQL query sequence:
SELECT department_id FROM employees WHERE first_name  =  "Clara"
SELECT * FROM employees WHERE department_id  =  (SELECT department_id FROM employees WHERE first_name  =  "Clara")
SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  (SELECT department_id FROM employees WHERE first_name  =  "Clara")
Final question: What are the full names and hire dates for employees in the same department as someone with the first name Clara?
Final SQL: SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  (SELECT department_id FROM employees WHERE first_name  =  "Clara")
Database: hr_1
Question sequence:
What are the department ids for departments that have someone with the first name Clara?
What is all the information about employees in those departments?
What are the full names and hire dates of those employees?
Of those, who does not have the first name Clara?
SQL query sequence:
SELECT department_id FROM employees WHERE first_name  =  "Clara"
SELECT * FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara")
SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara")
SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara") AND first_name ! =  "Clara"
Final question: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?
Final SQL: SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara") AND first_name ! =  "Clara"
Database: hr_1
Question sequence:
What are the department ids for departments with employees who have the letter T in their first name?
Who are the employees in those departments?
What are their ids and full names?
SQL query sequence:
SELECT department_id FROM employees WHERE first_name LIKE '%T%'
SELECT * FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )
SELECT employee_id ,  first_name ,  last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )
Final question: What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?
Final SQL: SELECT employee_id ,  first_name ,  last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )
Database: hr_1
Question sequence:
What is the average salary across all employees?
Which employees make more than that?
Of those, which work in departments with employees who have the letter J in their first name?
What are their ids, full names and salaries?
SQL query sequence:
SELECT AVG (salary) FROM employees
SELECT * FROM employees WHERE salary  >  ( SELECT AVG (salary) FROM employees )
SELECT * FROM employees WHERE salary  >  ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')
SELECT employee_id ,  first_name ,  last_name ,  salary FROM employees WHERE salary  >  ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')
Final question: What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?
Final SQL: SELECT employee_id ,  first_name ,  last_name ,  salary FROM employees WHERE salary  >  ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')
Database: hr_1
Question sequence:
What is the lowest salary for someone with the title MK_MAN?
Which employees make less than that?
What are their employee ids and job ids?
SQL query sequence:
SELECT min(salary) FROM employees WHERE job_id  =  'MK_MAN'
SELECT * FROM employees WHERE salary  <  ( SELECT min(salary) FROM employees WHERE job_id  =  'MK_MAN' )
SELECT employee_id ,  job_id FROM employees WHERE salary  <  ( SELECT min(salary) FROM employees WHERE job_id  =  'MK_MAN' )
Final question: What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?
Final SQL: SELECT employee_id ,  job_id FROM employees WHERE salary  <  ( SELECT min(salary) FROM employees WHERE job_id  =  'MK_MAN' )
Database: hr_1
Question sequence:
What is the highest salary for someone with the title PU_MAN?
Which employees make more than that?
What are their employee ids, full names, and job ids?
SQL query sequence:
SELECT max(salary) FROM employees WHERE job_id  =  'PU_MAN'
SELECT * FROM employees WHERE salary  >  ( SELECT max(salary) FROM employees WHERE job_id  =  'PU_MAN' )
SELECT employee_id ,  first_name ,  last_name ,  job_id FROM employees WHERE salary  >  ( SELECT max(salary) FROM employees WHERE job_id  =  'PU_MAN' )
Final question: What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?
Final SQL: SELECT employee_id ,  first_name ,  last_name ,  job_id FROM employees WHERE salary  >  ( SELECT max(salary) FROM employees WHERE job_id  =  'PU_MAN' )
Database: hr_1
Question sequence:
What are the department ids for departments which have more than 2 employees?
What is the sum of the salaries within each of those departments?
SQL query sequence:
SELECT department_id FROM employees GROUP BY department_id HAVING count(*)  >=  2
SELECT department_id ,  SUM(salary) FROM employees GROUP BY department_id HAVING count(*)  >=  2
Final question: What are total salaries and department id for each department that has more than 2 employees?
Final SQL: SELECT department_id ,  SUM(salary) FROM employees GROUP BY department_id HAVING count(*)  >=  2
Database: hr_1
Question sequence:
What are all the employee ids for employees who have had a job in the past?
What is all the information for employees who are not a part of those?
SQL query sequence:
SELECT employee_id FROM job_history GROUP BY employee_id
SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)
Final question: What is all the information about employees who have never had a job in the past?
Final SQL: SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)
Database: hr_1
Question sequence:
What are the first and last names for each employee?
Also, what are their department names?
Also, what are their city and state provinces?
SQL query sequence:
SELECT first_name ,  last_name FROM employees
SELECT T1.first_name ,  T1.last_name ,  T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id
SELECT T1.first_name ,  T1.last_name ,  T2.department_name ,  T3.city ,  T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id
Final question: What are the full names, departments, cities, and state provinces for each employee?
Final SQL: SELECT T1.first_name ,  T1.last_name ,  T2.department_name ,  T3.city ,  T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id
Database: hr_1
Question sequence:
What are the full names of each employee?
Also, what cities are their departments in?
Of these, which have the letter Z in their first name?
SQL query sequence:
SELECT first_name ,  last_name FROM employees
SELECT T1.first_name ,  T1.last_name ,  T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id
SELECT T1.first_name ,  T1.last_name ,  T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id WHERE T1.first_name LIKE '%z%'
Final question: What are the full names and cities of employees who have the letter Z in their first names?
Final SQL: SELECT T1.first_name ,  T1.last_name ,  T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id WHERE T1.first_name LIKE '%z%'
Database: hr_1
Question sequence:
What are the names of each department?
Also, in what city and state province are they in?
SQL query sequence:
SELECT department_name FROM departments
SELECT T1.department_name ,  T2.city ,  T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id  =  T1.location_id
Final question: What are the department names, cities, and state provinces for each department?
Final SQL: SELECT T1.department_name ,  T2.city ,  T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id  =  T1.location_id
Database: hr_1
Question sequence:
What are the full names and ids for all employees?
Also, what are the names of the countries that they work in?
SQL query sequence:
SELECT first_name ,  last_name ,  employee_id FROM employees
SELECT first_name ,  last_name ,  employee_id ,  country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id
Final question: What the full names, ids of each employee and the name of the country they are in?
Final SQL: SELECT first_name ,  last_name ,  employee_id ,  country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id
Database: hr_1
Question sequence:
What are the different department names?
How many employees work in each one?
SQL query sequence:
SELECT department_name FROM departments
SELECT department_name ,  COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY department_name
Final question: What are the department names and how many employees work in each of them?
Final SQL: SELECT department_name ,  COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY department_name
Database: hr_1
Question sequence:
Who are all the employees working in the city of London?
What are their full names and salaries?
SQL query sequence:
SELECT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN  locations AS T3 ON T2.location_id  =  T3.location_id WHERE  T3.city  =  'London'
SELECT first_name ,  last_name ,  salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN  locations AS T3 ON T2.location_id  =  T3.location_id WHERE  T3.city  =  'London'
Final question: What are full names and salaries of employees working in the city of London?
Final SQL: SELECT first_name ,  last_name ,  salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN  locations AS T3 ON T2.location_id  =  T3.location_id WHERE  T3.city  =  'London'
Database: college_3
Question sequence:
What is all the course information?
How many are there?
SQL query sequence:
SELECT * FROM COURSE
SELECT count(*) FROM COURSE
Final question: Count the number of courses.
Final SQL: SELECT count(*) FROM COURSE
Database: college_3
Question sequence:
What is all the information for courses with more than 2 credits?
How many are there?
SQL query sequence:
SELECT * FROM COURSE WHERE Credits  >  2
SELECT count(*) FROM COURSE WHERE Credits  >  2
Final question: Count the number of courses with more than 2 credits.
Final SQL: SELECT count(*) FROM COURSE WHERE Credits  >  2
Database: college_3
Question sequence:
SQL query sequence:
Final question: What are the names of courses with 1 credit?
Final SQL: SELECT CName FROM COURSE WHERE Credits  =  1
Database: college_3
Question sequence:
What are all the course names?
Of those, which are taught on the days MTW?
SQL query sequence:
SELECT CName FROM COURSE
SELECT CName FROM COURSE WHERE Days  =  "MTW"
Final question: What are the course names for courses taught on MTW?
Final SQL: SELECT CName FROM COURSE WHERE Days  =  "MTW"
Database: college_3
Question sequence:
How many departments are there?
Of those, how many are in the "AS" division?
SQL query sequence:
SELECT count(*) FROM DEPARTMENT
SELECT count(*) FROM DEPARTMENT WHERE Division  =  "AS"
Final question: How many departments are in the division AS?
Final SQL: SELECT count(*) FROM DEPARTMENT WHERE Division  =  "AS"
Database: college_3
Question sequence:
What is all the information about departments in room 268?
What are their phones?
SQL query sequence:
SELECT * FROM DEPARTMENT WHERE Room  =  268
SELECT DPhone FROM DEPARTMENT WHERE Room  =  268
Final question: Give the phones for departments in room 268.
Final SQL: SELECT DPhone FROM DEPARTMENT WHERE Room  =  268
Database: college_3
Question sequence:
What are the distinct student ids for students who have gotten a "B" grade?
How many are there?
SQL query sequence:
SELECT DISTINCT StuID FROM ENROLLED_IN WHERE Grade  =  "B"
SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade  =  "B"
Final question: How many students have had at least one "B" grade?
Final SQL: SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade  =  "B"
Database: college_3
Question sequence:
What is the maximum gradepoint?
Also, what is the minimum gradepoint?
SQL query sequence:
SELECT max(gradepoint) FROM GRADECONVERSION
SELECT max(gradepoint) ,  min(gradepoint) FROM GRADECONVERSION
Final question: What are the maximum and minumum grade points?
Final SQL: SELECT max(gradepoint) ,  min(gradepoint) FROM GRADECONVERSION
Database: college_3
Question sequence:
What are all the distinct student first names?
Of those, which contain the letter "a"?
SQL query sequence:
SELECT DISTINCT Fname FROM STUDENT
SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
Final question: What are the first names for students who have an "a" in their first name?
Final SQL: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
Database: college_3
Question sequence:
What are the full names of all the faculty?
Of those, which have sex M?
Of those, which are in building NEB?
SQL query sequence:
SELECT Fname ,  Lname FROM FACULTY
SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M"
SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M" AND Building  =  "NEB"
Final question: What are the full names of faculties with sex M and who live in building NEB?
Final SQL: SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M" AND Building  =  "NEB"
Database: college_3
Question sequence:
What are the rooms for all faculty with rank professor?
Of those, which are for faculty who live in building NEB?
SQL query sequence:
SELECT Room FROM FACULTY WHERE Rank  =  "Professor"
SELECT Room FROM FACULTY WHERE Rank  =  "Professor" AND Building  =  "NEB"
Final question: What are the rooms for members of the faculty who are professors and who live in building NEB?
Final SQL: SELECT Room FROM FACULTY WHERE Rank  =  "Professor" AND Building  =  "NEB"
Database: college_3
Question sequence:
What are the names of the departments?
Which corresponds to the one in building Mergenthaler?
SQL query sequence:
SELECT DName FROM DEPARTMENT
SELECT DName FROM DEPARTMENT WHERE Building  =  "Mergenthaler"
Final question: What is the name of the department in the Building Mergenthaler?
Final SQL: SELECT DName FROM DEPARTMENT WHERE Building  =  "Mergenthaler"
Database: college_3
Question sequence:
What is all the information about credits?
Order this in ascending order.
SQL query sequence:
SELECT * FROM COURSE
SELECT * FROM COURSE ORDER BY Credits
Final question: What is all the information about courses, ordered by credits ascending?
Final SQL: SELECT * FROM COURSE ORDER BY Credits
Database: college_3
Question sequence:
What are all the course names?
Order them by credits.
SQL query sequence:
SELECT CName FROM COURSE
SELECT CName FROM COURSE ORDER BY Credits
Final question: What are the course names, ordered by credits?
Final SQL: SELECT CName FROM COURSE ORDER BY Credits
Database: college_3
Question sequence:
What is all the student information, ordered by age descending?
What are their first names?
SQL query sequence:
SELECT * FROM STUDENT ORDER BY Age DESC
SELECT Fname FROM STUDENT ORDER BY Age DESC
Final question: What are the first names of students, ordered by age from greatest to least?
Final SQL: SELECT Fname FROM STUDENT ORDER BY Age DESC
Database: college_3
Question sequence:
What are the last names of all the female students?
Order this by age descending.
SQL query sequence:
SELECT LName FROM STUDENT WHERE Sex  =  "F"
SELECT LName FROM STUDENT WHERE Sex  =  "F" ORDER BY Age DESC
Final question: What are the last names of female students, ordered by age descending?
Final SQL: SELECT LName FROM STUDENT WHERE Sex  =  "F" ORDER BY Age DESC
Database: college_3
Question sequence:
What are the last names of faculty in building Barton?
Order this alphabetically.
SQL query sequence:
SELECT Lname FROM FACULTY WHERE Building  =  "Barton"
SELECT Lname FROM FACULTY WHERE Building  =  "Barton" ORDER BY Lname
Final question: What are the last names of faculty in building Barton, sorted by last name?
Final SQL: SELECT Lname FROM FACULTY WHERE Building  =  "Barton" ORDER BY Lname
Database: college_3
Question sequence:
What are the first names of all the faculty?
Of those, which are professors?
Sort this in alphabetical order.
SQL query sequence:
SELECT Fname FROM FACULTY
SELECT Fname FROM FACULTY WHERE Rank  =  "Professor"
SELECT Fname FROM FACULTY WHERE Rank  =  "Professor" ORDER BY Fname
Final question: What are the first names for all faculty professors, ordered by first name?
Final SQL: SELECT Fname FROM FACULTY WHERE Rank  =  "Professor" ORDER BY Fname
Database: college_3
Question sequence:
What are all the department names?
Order these descending by the number of students minoring in them.
Which has the most?
SQL query sequence:
SELECT DName FROM DEPARTMENT
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1
Final question: What is the name of the department with the most students minoring in it?
Final SQL: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1
Database: college_3
Question sequence:
What are the names of departments that have students minoring in them?
What are all the other department names?
SQL query sequence:
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO
SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO
Final question: What is the name of the department htat has no students minoring in it?
Final SQL: SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO
Database: college_3
Question sequence:
What are all the department names?
Order them by the number of members in each.
Which has the fewest?
SQL query sequence:
SELECT DName FROM DEPARTMENT
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1
Final question: What is the name of the department with the fewest members?
Final SQL: SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1
Database: college_3
Question sequence:
What are the different faculty ranks?
Order them by the number of faculty in each rank.
Which has the fewest?
SQL query sequence:
SELECT Rank FROM FACULTY GROUP BY Rank
SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC
SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1
Final question: What is the least common faculty rank?
Final SQL: SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1
Database: college_3
Question sequence:
What are the full names of all the faculty?
Order them by the number of courses they teach, descending.
Who are the top three?
SQL query sequence:
SELECT Fname ,  Lname FROM FACULTY
SELECT T2.Fname ,  T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC
SELECT T2.Fname ,  T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3
Final question: What are the full names of the 3 instructors who teach the most courses?
Final SQL: SELECT T2.Fname ,  T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3
Database: college_3
Question sequence:
What is all the information about all the faculty?
Order this by the number of courses each faculty teaches, descending.
What is the building that the one who teachest the most lives in?
SQL query sequence:
SELECT * FROM FACULTY
SELECT * FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC
SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1
Final question: Give the building that the instructor who teaches the greatest number of courses lives in.
Final SQL: SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1