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 is the name of the department that has the largest number of students enrolled?
SQL: SELECT T4.dept_name 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 GROUP BY T3.dept_code ORDER BY count(*) 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: What is the name of the department with the most students enrolled?
SQL: SELECT T4.dept_name 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 GROUP BY T3.dept_code ORDER BY count(*) 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: list names of all departments ordered by their names.
SQL: SELECT dept_name FROM department ORDER BY dept_name
-- 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 names of all departments in alphabetical order?
SQL: SELECT dept_name FROM department ORDER BY dept_name
-- 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: List the codes of all courses that take place in room KLR209.
SQL: SELECT class_code FROM CLASS WHERE class_room  =  'KLR209'
-- 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 codes of all the courses that are located in room KLR209?
SQL: SELECT class_code FROM CLASS WHERE class_room  =  'KLR209'
-- 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: List the first name of all employees with job code PROF ordered by their date of birth.
SQL: SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' ORDER BY emp_dob
-- 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 employees that are professors ordered by date of birth?
SQL: SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' ORDER BY emp_dob
-- 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 first names and offices of all professors sorted by alphabetical order of their first name.
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num ORDER BY T2.emp_fname
-- 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 and office locations for all professors sorted alphabetically by first name?
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num ORDER BY T2.emp_fname
-- 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 and last name of the oldest employee?
SQL: SELECT emp_fname ,  emp_lname FROM employee ORDER BY emp_dob 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: What are the first and last names of the employee with the earliest date of birth?
SQL: SELECT emp_fname ,  emp_lname FROM employee ORDER BY emp_dob 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: What is the first, last name, gpa of the youngest one among students whose GPA is above 3?
SQL: SELECT stu_fname ,  stu_lname ,  stu_gpa FROM student WHERE stu_gpa  >  3 ORDER BY stu_dob 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: What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?
SQL: SELECT stu_fname ,  stu_lname ,  stu_gpa FROM student WHERE stu_gpa  >  3 ORDER BY stu_dob 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: What is the first name of students who got grade C in any class?
SQL: SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE 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 got a grade C in a class?
SQL: SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE 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 is the name of department where has the smallest number of professors?
SQL: SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) 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: What is the name of the department with the fewest professors?
SQL: SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) 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: What is the name of department where has the largest number of professors with a Ph.D. degree?
SQL: SELECT 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 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 has the most professors with a Ph.D.?
SQL: SELECT 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 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: What are the first names of the professors who do not teach a class.
SQL: SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num
-- 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 professors not teaching any classes?
SQL: SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num
-- 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 names of the professors from the history department who do not teach a class.
SQL: SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T2.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num  =  T5.prof_num