Database: college_1

Question: How many professors are in the accounting dept?
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"

Question: How many professors teach a class with the code ACCT-211?
SQL: SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"

Question: What are the first and last name of all biology professors?
SQL: SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"

Question: What are the first names and birthdates of the professors in charge of ACCT-211?
SQL: SELECT DISTINCT T1.EMP_FNAME ,  T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE CRS_CODE  =  "ACCT-211"

Question: How many classes does the professor whose last name is Graztevski teach?
SQL: SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE T1.EMP_LNAME  =  'Graztevski'

Question: What is the school code of the accounting department?
SQL: SELECT school_code FROM department WHERE dept_name  =  "Accounting"

Question: What is the description for the CIS-220 and how many credits does it have?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'CIS-220'

Question: Where is the history department?
SQL: SELECT dept_address FROM department WHERE dept_name  =  'History'

Question: What are the different locations of the school with the code BUS?
SQL: SELECT count(DISTINCT dept_address) FROM department WHERE school_code  =  'BUS'

Question: Count different addresses of each school.
SQL: SELECT count(DISTINCT dept_address) ,  school_code FROM department GROUP BY school_code

Question: What is the course description and number of credits for QM-261?
SQL: SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'QM-261'

Question: How many departments are in each school?
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code

Question: How many different departments are there in each school that has less than 5 apartments?
SQL: SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name)  <  5

Question: How many sections does each course have?
SQL: SELECT count(*) ,  crs_code FROM CLASS GROUP BY crs_code

Question: How many credits does the department offer?
SQL: SELECT sum(crs_credit) ,  dept_code FROM course GROUP BY dept_code

Question: For each classroom with at least 2 classes, how many classes are offered?
SQL: SELECT count(*) ,  class_room FROM CLASS GROUP BY class_room HAVING count(*)  >=  2

Question: How many classes are held in each department?
SQL: SELECT count(*) ,  dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY dept_code

Question: How many classes exist for each school?
SQL: SELECT count(*) ,  T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T2.dept_code  =  T3.dept_code GROUP BY T3.school_code