sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the number of different course codes?
SQL: SELECT count(DISTINCT crs_code) FROM CLASS
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many departments does the college has?
SQL: SELECT count(DISTINCT dept_name) FROM department
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many different departments are there?
SQL: SELECT count(DISTINCT dept_name) FROM department
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many courses are offered by the Computer Info. Systems department?
SQL: SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many courses does the department of Computer Information Systmes offer?
SQL: SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many sections does course ACCT-211 has?
SQL: SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the number of different class sections offered in the course ACCT-211?
SQL: SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the total credits of all classes offered by each department.
SQL: SELECT sum(T1.crs_credit) ,  T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY T1.dept_code
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the total number of credits offered by each department?
SQL: SELECT sum(T1.crs_credit) ,  T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY T1.dept_code
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the name of the department that offers the largest number of credits of all classes.
SQL: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which department offers the most credits all together?
SQL: SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many students enrolled in class ACCT-211?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code WHERE T1.crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the total number of students enrolled in ACCT-211?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code WHERE T1.crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the first name of each student enrolled in class ACCT-211?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the first names of all students in course ACCT-211?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the first name of students enrolled in class ACCT-211 and got grade C?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211' AND T2.enroll_grade  =  'C'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the first names of all students who took ACCT-211 and received a C?
SQL: SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211' AND T2.enroll_grade  =  'C'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the total number of employees.
SQL: SELECT count(*) FROM employee
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many employees are there all together?
SQL: SELECT count(*) FROM employee
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many professors do have a Ph.D. degree?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the total number of professors with a Ph.D. ?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many students are enrolled in the class taught by some professor from the accounting department?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code WHERE T4.dept_name  =  'Accounting'
-- Language PostgreSQL
        -- Tables: 
             -- Table: class 
columns : [['class code', 'text'], ['course code', 'text'], ['class section', 'text'], ['class time', 'text'], ['class room', 'text'], ['professor employee number', 'number']]

 -- Table: course 
columns : [['course code', 'text'], ['department code', 'text'], ['course description', 'text'], ['course credit', 'number']]

 -- Table: department 
columns : [['department code', 'text'], ['department name', 'text'], ['school code', 'text'], ['employee number', 'number'], ['department address', 'text'], ['department extension', 'text']]

 -- Table: employee 
columns : [['employee number', 'number'], ['employee last name', 'text'], ['employee first name', 'text'], ['employee initial', 'text'], ['employee job code', 'text'], ['employee hire date', 'time'], ['employee date of birth', 'time']]

 -- Table: enroll 
columns : [['class code', 'text'], ['student number', 'number'], ['enroll grade', 'text']]

 -- Table: professor 
columns : [['employee number', 'number'], ['department code', 'text'], ['professor office', 'text'], ['professor extension', 'text'], ['professor high degree', 'text']]

 -- Table: student 
columns : [['student num', 'number'], ['student last name', 'text'], ['student first name', 'text'], ['student init', 'text'], ['student date of birth', 'time'], ['student class hours took', 'number'], ['student class', 'text'], ['student gpa', 'number'], ['student transfer', 'number'], ['department code', 'text'], ['student phone', 'text'], ['professor number', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many students are enrolled in some classes that are taught by an accounting professor?
SQL: SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code WHERE T4.dept_name  =  'Accounting'