target-benchmark/spider-queries huggingface dataset:
Database: college_1 (tables: department)
Question: What are the names of all departments in alphabetical order?
SQL: SELECT dept_name FROM department ORDER BY dept_name
Database: college_1 (tables: class)
Question: List the codes of all courses that take place in room KLR209.
SQL: SELECT class_code FROM CLASS WHERE class_room  =  'KLR209'
Database: college_1 (tables: class)
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'
Database: college_1 (tables: employee)
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
Database: college_1 (tables: employee)
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
Database: college_1 (tables: employee, professor)
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
Database: college_1 (tables: employee, professor)
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
Database: college_1 (tables: employee)
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
Database: college_1 (tables: employee)
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
Database: college_1 (tables: student)
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
Database: college_1 (tables: student)
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
Database: college_1 (tables: enroll, student)
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'
Database: college_1 (tables: enroll, student)
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'
Database: college_1 (tables: department, professor)
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
Database: college_1 (tables: department, professor)
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
Database: college_1 (tables: department, professor)
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
Database: college_1 (tables: department, professor)
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
Database: college_1 (tables: employee, class)
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
Database: college_1 (tables: employee, class)
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
Database: college_1 (tables: class, department, employee, professor)
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
Database: college_1 (tables: class, department, employee, professor)
Question: What are the first names of all history professors who do not teach?
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
Database: college_1 (tables: department, employee, professor)
Question: What is the last name and office of the professor from the history department?
SQL: SELECT T1.emp_lname ,  T2.prof_office 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'
Database: college_1 (tables: department, employee, professor)
Question: What are the last name and office of all history professors?
SQL: SELECT T1.emp_lname ,  T2.prof_office 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'
Database: college_1 (tables: department, employee, professor)
Question: What is department name and office for the professor whose last name is Heffington?
SQL: SELECT T3.dept_name  ,  T2.prof_office 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 T1.emp_lname  =  'Heffington'
Database: college_1 (tables: department, employee, professor)
Question: What is the name of the department and office location for the professor with the last name of Heffington?
SQL: SELECT T3.dept_name  ,  T2.prof_office 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 T1.emp_lname  =  'Heffington'
Database: college_1 (tables: employee, professor)
Question: Find the last name and hire date of the professor who is in office DRE 102.
SQL: SELECT T1.emp_lname ,  T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num WHERE T2.prof_office  =  'DRE 102'
Database: college_1 (tables: employee, professor)
Question: What is the last name of the professor whose office is located in DRE 102, and when were they hired?
SQL: SELECT T1.emp_lname ,  T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num WHERE T2.prof_office  =  'DRE 102'
Database: college_1 (tables: enroll, student, class)
Question: What is the code of the course which the student whose last name is Smithson took?
SQL: SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num WHERE T3.stu_lname  =  'Smithson'
Database: college_1 (tables: enroll, student, class)
Question: What are the course codes for every class that the student with the last name Smithson took?
SQL: SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num WHERE T3.stu_lname  =  'Smithson'
Database: college_1 (tables: enroll, course, student, class)
Question: What are the description and credit of the course which the student whose last name is Smithson took?
SQL: SELECT T4.crs_description ,  T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num JOIN course AS T4 ON T4.crs_code  =  T1.crs_code WHERE T3.stu_lname  =  'Smithson'
Database: college_1 (tables: enroll, course, student, class)
Question: How many credits is the course that the student with the last name Smithson took, and what is its description?
SQL: SELECT T4.crs_description ,  T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num JOIN course AS T4 ON T4.crs_code  =  T1.crs_code WHERE T3.stu_lname  =  'Smithson'
Database: college_1 (tables: professor)
Question: How many professors who has a either Ph.D. or MA degree?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.' OR prof_high_degree  =  'MA'
Database: college_1 (tables: professor)
Question: How many professors attained either Ph.D. or Masters degrees?
SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.' OR prof_high_degree  =  'MA'
Database: college_1 (tables: department, professor)
Question: How many professors who are from either Accounting or Biology department?
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T2.dept_name  =  'Accounting' OR T2.dept_name  =  'Biology'
Database: college_1 (tables: department, professor)
Question: What is the number of professors who are in the Accounting or Biology departments?
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T2.dept_name  =  'Accounting' OR T2.dept_name  =  'Biology'
Database: college_1 (tables: employee, class)
Question: Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.
SQL: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'QM-261'
Database: college_1 (tables: employee, class)
Question: What is the first name of the professor who is teaching CIS-220 and QM-261?
SQL: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'QM-261'
Database: college_1 (tables: student, course, class, department, enroll)
Question: Find the first name of student who is taking classes from accounting and Computer Info. Systems departments
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  'Computer Info. Systems'
Database: college_1 (tables: student, course, class, department, enroll)
Question: What are the first names of all students taking accoutning and Computer Information Systems classes?
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  'Computer Info. Systems'
Database: college_1 (tables: enroll, student, class)
Question: What is the average gpa of the students enrolled in the course with code ACCT-211?
SQL: SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T1.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211'
Database: college_1 (tables: enroll, student, class)
Question: What is the average GPA of students taking ACCT-211?
SQL: SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T1.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211'
Database: college_1 (tables: student)
Question: What is the first name, gpa and phone number of the top 5 students with highest gpa?
SQL: SELECT stu_gpa ,  stu_phone ,  stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
Database: college_1 (tables: student)
Question: What is the first name, GPA, and phone number of the students with the top 5 GPAs?
SQL: SELECT stu_gpa ,  stu_phone ,  stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
Database: college_1 (tables: student, department)
Question: What is the department name of the students with lowest gpa belongs to?
SQL: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1
Database: college_1 (tables: student, department)
Question: What is the name of the department with the student that has the lowest GPA?
SQL: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1
Database: college_1 (tables: student)
Question: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.
SQL: SELECT stu_fname ,  stu_gpa FROM student WHERE stu_gpa  <  (SELECT avg(stu_gpa) FROM student)
Database: college_1 (tables: student)
Question: What is the first name and GPA of every student that has a GPA lower than average?
SQL: SELECT stu_fname ,  stu_gpa FROM student WHERE stu_gpa  <  (SELECT avg(stu_gpa) FROM student)
Database: college_1 (tables: student, department)
Question: Find the name and address of the department that has the highest number of students.
SQL: SELECT T2.dept_name ,  T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: student, department)
Question: What is the name and address of the department with the most students?
SQL: SELECT T2.dept_name ,  T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1
Database: college_1 (tables: student, department)
Question: Find the name, address, number of students in the departments that have the top 3 highest number of students.
SQL: SELECT T2.dept_name ,  T2.dept_address ,  count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3
Database: college_1 (tables: student, department)
Question: What is the name, address, and number of students in the departments that have the 3 most students?
SQL: SELECT T2.dept_name ,  T2.dept_address ,  count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3
Database: college_1 (tables: department, employee, professor)
Question: Find the first name and office of the professor who is in the history department and has a Ph.D. degree.
SQL: SELECT T1.emp_fname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T3.dept_code  =  T2.dept_code WHERE T3.dept_name  =  'History' AND T2.prof_high_degree  =  'Ph.D.'
Database: college_1 (tables: department, employee, professor)
Question: What are the first names and office of the professors who are in the history department and have a Ph.D?
SQL: SELECT T1.emp_fname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T3.dept_code  =  T2.dept_code WHERE T3.dept_name  =  'History' AND T2.prof_high_degree  =  'Ph.D.'
Database: college_1 (tables: employee, class)
Question: Find the first names of all instructors who have taught some course and the course code.
SQL: SELECT T2.emp_fname ,  T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num
Database: college_1 (tables: employee, class)
Question: What are the first names of all teachers who have taught a course and the corresponding course codes?
SQL: SELECT T2.emp_fname ,  T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num
Database: college_1 (tables: course, employee, class)
Question: Find the first names of all instructors who have taught some course and the course description.
SQL: SELECT T2.emp_fname ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code
Database: college_1 (tables: course, employee, class)
Question: What are the first names of all teachers who have taught a course and the corresponding descriptions?
SQL: SELECT T2.emp_fname ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code
Database: college_1 (tables: course, employee, class, professor)
Question: Find the first names and offices of all instructors who have taught some course and also find the course description.
SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num
Database: college_1 (tables: course, employee, class, professor)
Question: What are the first names, office locations of all lecturers who have taught some course?
SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num
Database: college_1 (tables: course, employee, class, department, professor)
Question: Find the first names and offices of all instructors who have taught some course and the course description and the department name.
SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code
Database: college_1 (tables: course, employee, class, department, professor)
Question: What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?
SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code
Database: college_1 (tables: enroll, course, student, class)
Question: Find names of all students who took some course and the course description.
SQL: SELECT T1.stu_fname ,  T1.stu_lname ,  T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code
Database: college_1 (tables: enroll, course, student, class)
Question: What are the names of all students who took a class and the corresponding course descriptions?
SQL: SELECT T1.stu_fname ,  T1.stu_lname ,  T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code
Database: college_1 (tables: enroll, student)
Question: Find names of all students who took some course and got A or C.
SQL: SELECT T1.stu_fname ,  T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'C' OR T2.enroll_grade  =  'A'
Database: college_1 (tables: enroll, student)
Question: What are the names of all students taking a course who received an A or C?
SQL: SELECT T1.stu_fname ,  T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'C' OR T2.enroll_grade  =  'A'
Database: college_1 (tables: department, employee, class, professor)
Question: Find the first names of all professors in the Accounting department who is teaching some course and the class room.
SQL: SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Accounting'
Database: college_1 (tables: department, employee, class, professor)
Question: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?
SQL: SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Accounting'
Database: college_1 (tables: department, employee, class, professor)
Question: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Computer Info. Systems'
Database: college_1 (tables: department, employee, class, professor)
Question: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?
SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Computer Info. Systems'
Database: college_1 (tables: enroll, student)
Question: What is the last name of the student who got a grade A in the class with code 10018.
SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
Database: college_1 (tables: enroll, student)
Question: What is the last name of the student who received an A in the class with the code 10018?
SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
Database: college_1 (tables: department, employee, professor)
Question: Find the first name and office of history professor who did not get a Ph.D. degree.
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' AND T1.prof_high_degree != 'Ph.D.'
Database: college_1 (tables: department, employee, professor)
Question: What are the first names and offices of history professors who don't have Ph.D.s?
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' AND T1.prof_high_degree != 'Ph.D.'