[
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in a PhD program for 4 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.yearsInProgram = '4'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a certain level of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.course_id, t.p_id FROM course c, taughtBy t WHERE c.course_id = t.course_id AND t.p_id IN (SELECT p.p_id FROM person p WHERE p.yearsInProgram = 'Master')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of a course taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND LENGTH(person.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been teaching for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 10 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, person p, taughtBy tb WHERE p.p_id = tb.p_id AND p.yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.professor='TRUE'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least one course with a course level 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND course.courseLevel = 'Beginner' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has at least 2 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.yearsInProgram >= '2' AND t.p_id = p.p_id AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor with a certain courseLevel?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, taughtBy.p_id FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'PhD'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor who advised the student with p_id 2?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM advisedBy WHERE p_id_dummy = (SELECT p_id FROM person WHERE p_id = 2))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the courses taught by a professor who has more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy ab WHERE p_id_dummy IS NOT NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "Who are all the professors in the database?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person WHERE professor = 't'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have more than 10 students, taught by a professor who has been in the program for 3 years?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy, person WHERE person.yearsInProgram = '3' AND taughtBy.p_id = person.p_id AND (SELECT COUNT(*) FROM person, 'advisedBy' WHERE person.p_id = 'advisedBy'.p_id AND 'advisedBy'.p_id_dummy = person.p_id AND person.student = 1) > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught a course in the 'junior' level?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'junior' AND p.hasPosition='professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the highest level of a course taught by a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id AND person.hasPosition = 'professor' GROUP BY course.courseLevel ORDER BY course.courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a person of professor level and has position 'postdoc'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'postdoc' AND person.hasPosition = 'postdoc'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.student = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='professor' AND LENGTH(person.yearsInProgram) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by the professor with the highest number of taught courses?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id GROUP BY course.course_id, course.courseLevel ORDER BY COUNT(taughtBy.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course with course id 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a position of 'Assistant Professor'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'Assistant Professor' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of all the courses taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have advised students who are currently in their third year of study?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id JOIN advisedBy ab ON p.p_id = ab.p_id_dummy WHERE p.hasPosition = 'professor' AND p.inPhase = 'third year' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by a professor with over 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did a student, who is also a professor and has been in the program for more than 4 years, teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 4"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that are taught by a professor who has a PhD?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1 AND p.hasPosition LIKE '%PhD%'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught at least one course in the past?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN (SELECT p_id, COUNT(*) as count FROM taughtBy GROUP BY p_id HAVING COUNT(*) > 0) tb ON t.p_id = tb.p_id ORDER BY c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the name of the professor who has taught the course with courseLevel as 'Bachelor'?",
    "evidence": "",
    "SQL": "SELECT person.professor FROM course, person, taughtBy WHERE course.courseLevel = 'Bachelor' AND course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches courses at a level of 'beginner'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.professor FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What course does professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with ID 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught 'Introduction to Databases'?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy WHERE course_id IN (SELECT course_id FROM course WHERE courseLevel='Introduction to Databases') AND p_id IN (SELECT p_id FROM person WHERE professor=1)"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of a course that is taught by a person with the position 'associate professor'?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'associate professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor taught the course with courseLevel 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy WHERE course_id IN (SELECT course_id FROM course WHERE courseLevel = 'Beginner')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the courseLevel of the course taught by a professor who has advised a student?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id IN (SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor' AND p_id IN (SELECT p_id FROM advisedBy)))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did Professor 1 teach in a senior level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id WHERE tb.p_id IN (SELECT p_id FROM person WHERE hasPosition='Professor' AND yearsInProgram='senior') AND c.courseLevel='senior'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy WHERE p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by a person with at least 2 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses that are taught by professors who have a student advised by another professor?",
    "evidence": "",
    "SQL": "SELECT distinct course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person p ON taughtBy.p_id = p.p_id JOIN \"advisedBy\" ab ON p.p_id = ab.p_id_dummy WHERE ab.p_id_dummy IS NOT NULL GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM course C, taughtBy T, person P WHERE P.p_id = T.p_id AND P.inPhase = 'Program' AND LENGTH(P.yearsInProgram) >= 5 GROUP BY C.course_id, C.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught courses at the 200 level or above?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND c.courseLevel >= '200'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course with course_id 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'advisor' GROUP BY c.course_id, c.courseLevel HAVING COUNT(p.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course with a course level of 'Bachelor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Bachelor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who advises at least one student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'adviser' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by professors who have advised more than one student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'Professor' AND person.p_id IN (SELECT p_id FROM advisedBy GROUP BY p_id HAVING count(p_id_dummy) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have Professor XYZ taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 'Professor XYZ')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are also advisors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has been in the program for more than 3 years and has taught a course at the undergraduate level?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > 3 AND person.hasPosition = 'Undergraduate' GROUP BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches course with courseLevel 'undergraduate'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.hasPosition FROM person JOIN taughtBy ON person.p_id = taughtBy.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has a degree in Computer Science and has been teaching at the university for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Computer Science' AND person.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors in a specific level?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel, course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Foo teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.professor = 'Foo'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught at least one course at a course level of 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'Undergraduate' AND p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course with a course level of 'Graduate'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND course.courseLevel = 'Graduate'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of a course taught by a professor who has been in the program for more than 3 years and advises a student?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase != 'none' AND LENGTH(person.yearsInProgram) > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What professors are advising students in the program?",
    "evidence": "",
    "SQL": "SELECT distinct p1.hasPosition, p1.professor FROM person p1 JOIN advisedBy a1 ON p1.p_id = a1.p_id_dummy"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for 3 years or more?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.yearsInProgram >= '3' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of a course that a student is taught by a professor with more than 5 years in program?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'student' AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of 'Introduction to Data Science'?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = (SELECT course_id FROM course WHERE course_id LIKE '%Introduction to Data Science%')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by students?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'student')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did Professor 'John Doe' teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor='John Doe'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person WHERE p_id IN (SELECT p_id FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who have more than 2 years in program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '2' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 3 years and has a position as a professor?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3 AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches the course 'Introduction to Programming'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor, person.student, person.hasPosition, person.inPhase, person.yearsInProgram FROM taughtBy JOIN course ON course.course_id = taughtBy.course_id JOIN person ON person.p_id = taughtBy.p_id WHERE course.courseLevel = 'Introductory' AND course.course_id = 'Introduction to Programming'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has more than one student in their advising relationship?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.p_id IN (SELECT p2.p_id FROM person p2 JOIN advisedBy a ON p2.p_id = a.p_id_dummy GROUP BY p2.p_id HAVING COUNT(a.p_id_dummy) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.professor = 'True'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is advising at least one student?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND p.p_id IN (SELECT advisedBy.p_id FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors in the first year?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='Professor' AND p.inPhase='First Year'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a person who has the professor position and has been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > '2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students for more than two years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy, advisedBy WHERE person.p_id = taughtBy.p_id AND advisedBy.p_id = person.p_id AND person.yearsInProgram > 2 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have more than 5 years of experience in a department?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM taughtBy T, course C WHERE T.p_id IN (SELECT P.p_id FROM person P WHERE P.yearsInProgram > '5') GROUP BY C.course_id, C.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise a student in the fourth phase?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.inPhase = 'fourth' AND t.p_id = p.p_id AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'program' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor named John taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor having more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.p_id = t.p_id AND p.yearsInProgram > '5 years' AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that are taught by a professor who has advised a student?",
    "evidence": "",
    "SQL": "SELECT * FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'professor' AND EXISTS (SELECT * FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors with at least 2 years in program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor who has been in the program for more than 2 years and has a position as a professor taught?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'Professor' AND person.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a student with a student ID of 10 has been advised by a professor of in the freshman phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy AS t JOIN course AS c ON t.course_id = c.course_id JOIN person AS p ON t.p_id = p.p_id JOIN \"advisedBy\" AS ab ON p.p_id = ab.p_id WHERE p.student = 10 AND ab.p_id_dummy = 10 AND p.inPhase = 'freshman' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Who are the professors that teach the 'Introduction to Data Science' course?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Introduction to Data Science'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 2 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram>'2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does John Smith teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.student = NULL AND person.hasPosition = 'Professor' AND person.inPhase = 'None' AND person.yearsInProgram = 'None' AND person.p_id = (SELECT p_id FROM person WHERE professor = 'John Smith')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor with id 1 teach?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel, course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE p_id = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor teaches the courses with the highest level?",
    "evidence": "",
    "SQL": "SELECT c.courseLevel, p.professor FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id GROUP BY c.courseLevel, p.professor ORDER BY c.courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What professors have taught a course on 'Advanced Data Structures'?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel = 'Advanced Data Structures'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that are taught by a professor who has a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND person.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by Professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 3 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.yearsInProgram = '3'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the id of the course that has Professor A teaching it?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor' AND professor = 'A')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by professor who has been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '3' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a minimum of 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.inPhase = 'yes' AND (p.yearsInProgram - 0) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of all courses taught by professor with ID 3?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.p_id = 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor in the introductory level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND c.courseLevel='introductory' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, person, course WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram >= 5 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has advised at least two students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id AND (SELECT COUNT(*) FROM advisedBy WHERE advisedBy.p_id = person.p_id) >= 2 GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by a professor with a title of 'Professor'? ",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5 GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by Professors who have a position?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition IS NOT NULL AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for 4 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy tb ON c.course_id = tb.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram = 4 AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by professor John?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor with more than 3 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND p.p_id IN (SELECT a.p_id FROM advisedBy a GROUP BY a.p_id HAVING COUNT(a.p_id)>0)"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches courses at level 'Advanced'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.p_id, p.professor FROM taughtBy t JOIN person p ON t.p_id = p.p_id WHERE t.course_id IN (SELECT c.course_id FROM course c WHERE c.courseLevel = 'Advanced') AND p.student IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the courses taught by professors who have more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id FROM course c, taughtBy t WHERE t.p_id IN (SELECT p.p_id FROM person p WHERE yearsInProgram > 5) AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.professor = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in a position for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'True' AND p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor teaches the course that has the highest courseLevel?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel = (SELECT MAX(courseLevel) FROM course)"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have been advising students for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'adviser' AND p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith currently teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught more than 3 courses?",
    "evidence": "",
    "SQL": "SELECT C.course_id FROM course C, taughtBy T WHERE T.p_id IN (SELECT p_id FROM person WHERE hasPosition='professor') AND T.course_id IN (SELECT course_id FROM course WHERE course_id IN (SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(*) > 3))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by people with more than 3 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught all the courses of level 'Advanced'?",
    "evidence": "",
    "SQL": "SELECT p.student, p.p_id FROM person p JOIN taughtBy t ON p.p_id = t.p_id WHERE t.course_id IN (SELECT course_id FROM course WHERE courseLevel = 'Advanced')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by the professor with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT professor FROM person WHERE p_id = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least two courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN (SELECT p_id, COUNT(*) AS course_count FROM taughtBy GROUP BY p_id HAVING COUNT(*) >= 2) AS prof_with_two_courses ON taughtBy.p_id = prof_with_two_courses.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by the professor who has advised the most students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE hasPosition = 'professor' ORDER BY (SELECT COUNT(*) FROM advisedBy WHERE p_id = person.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor X teaching?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught more than 1 course?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy tb, person p WHERE c.course_id = tb.course_id AND tb.p_id = p.p_id AND p.hasPosition = 'Professor' GROUP BY c.course_id HAVING COUNT(c.course_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught a course at the beginner level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.professor FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by a professor who has taught at the university for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level taught by a professor in the 'advisedBy' relationship?",
    "evidence": "",
    "SQL": "SELECT AVG(course.courseLevel) AS avg_course_level FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 3 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 3 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been advising students for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'professor' AND person.yearsInProgram > '2' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course with courseLevel 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM taughtBy AS t JOIN course AS c ON t.course_id = c.course_id JOIN person AS p ON t.p_id = p.p_id WHERE c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught the course Computer Science",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.course_id IN (SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by a professor with at least 10 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND (LENGTH(p.yearsInProgram) - LENGTH(REPLACE(p.yearsInProgram, ' ', ''))) >= 10"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches a course that has 'advanced' as its level?",
    "evidence": "",
    "SQL": "SELECT person.professor AS p_id FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE course.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor named 'John'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by professor with id 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have been advising students for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy, person WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > '5' AND NOT EXISTS (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does John, a professor with at least 10 years of experience in the program, teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= 10 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of a course taught by a student?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been a professor for more than 10 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND EXISTS (SELECT 1 FROM advisedBy ab INNER JOIN person abp ON ab.p_id = abp.p_id WHERE ab.p_id_dummy = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who have been teaching for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a minimum of 2 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level for all courses taught by professors who have more than 3 years in the program?",
    "evidence": "",
    "SQL": "SELECT AVG(courseLevel) FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' AND p.professor = 'true'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor with more than 2 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'student'))"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition, p.p_id, c.course_id FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id GROUP BY p.p_id, p.hasPosition HAVING COUNT(tb.course_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught a course at the undergraduate level?",
    "evidence": "",
    "SQL": "SELECT p.p_id, p.professor, p.hasPosition FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in phase 1 of their program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = 'phase 1'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with a minimum of 3 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has advised a student in the same course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN advisedBy ab ON tb.p_id = ab.p_id_dummy AND ab.p_id = tb.p_id GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by Professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > 5 GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor taught who are not students themselves?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.student IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the junior level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 'yes' AND c.courseLevel = 'junior'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught courses for which a student is a professor?",
    "evidence": "",
    "SQL": "SELECT distinct p1.p_id, p1.professor AS p_id FROM person p1 JOIN taughtBy tb ON p1.p_id = tb.p_id JOIN person p2 ON p2.p_id = tb.course_id AND p2.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb INNER JOIN course AS c ON tb.course_id = c.course_id INNER JOIN person AS p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students in the past?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='Professor' AND EXISTS (SELECT 1 FROM advisedBy a WHERE a.p_id = p.p_id AND a.p_id_dummy IS NOT NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with the highest number of advised students teaching in Fall 2021?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Fall 2021' ORDER BY (SELECT COUNT(*) FROM advisedBy a WHERE a.p_id = p.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors in the 'undergraduate' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 3 years in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '3' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT C.course_id FROM course C JOIN taughtBy T ON C.course_id = T.course_id JOIN person P ON T.p_id = P.p_id WHERE P.hasPosition = 'professor' AND P.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses at the undergraduate level?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition, c.courseLevel, p.p_id, p.p_id AS professor_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel = 'undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught in both the Bachelor's and Master's phases?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy LEFT JOIN person ON taughtBy.p_id = person.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE person.hasPosition = 'Professor' AND (person.inPhase = 'Bachelor''s' OR person.inPhase = 'Master''s') GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course with the highest level and who teaches it?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.professor FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id ORDER BY c.courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a yearsInProgram value greater than 3?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years and is in phase 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5 AND p.inPhase = 'phase 2' ORDER BY c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have a course level of 'Graduate' and are taught by professors with a 'Position' of 'Assistant Professor'?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE course.courseLevel = 'Graduate' AND person.hasPosition = 'Assistant Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all courses that a student in Phase 3 and has spent 2 years in program taught by a professor who advised a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.inPhase = 'Phase 3' AND p.yearsInProgram = '2' AND EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a professorial position?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.student IS NULL AND p.yearsInProgram >= 5 AND c.course_id = t.course_id AND t.p_id = p.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor that has a position of 'Director'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.p_id = t.p_id AND p.hasPosition = 'Director'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor in the first year?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.inPhase = 'first year'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has taught at the university for more than 10 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor named Bob?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.student IS NULL AND person.professor = 'Bob'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '3' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that have more than one instructor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id AS instructor_id, p.hasPosition, p.student FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id GROUP BY c.course_id, c.courseLevel, t.p_id HAVING COUNT(t.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have the position of 'Head of Department'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'Head of Department' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in their 2nd year of teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram = '2nd'"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught a course at each level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT person.p_id, person.student, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.course_id = course.course_id AND taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been advising students for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM taughtBy tb, person p, course c WHERE p.p_id = tb.p_id AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with more than 2 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor in the person table?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have advised students in the programming phase of the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy, advisedBy WHERE person.p_id = advisedBy.p_id AND advisedBy.p_id_dummy = person.p_id AND person.hasPosition = 'Professor' AND person.inPhase = 'programming' AND course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are currently in the first year of their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'first year'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY tb.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a student who is not a professor?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id WHERE NOT EXISTS (SELECT * FROM person p WHERE p.p_id = t.p_id AND p.hasPosition = 'Professor')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has been in the program for more than 5 years and is currently in the third phase?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy AS tb JOIN person AS p ON tb.p_id = p.p_id WHERE p.inPhase = 'third' AND p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has the professor with id 1 taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id WHERE tb.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram > '5' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '2' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have Professor Johnson taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND p_id IN (SELECT p_id FROM person WHERE professor = 'Johnson')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have both Professor Smith and Professor Johnson as instructors?",
    "evidence": "",
    "SQL": "SELECT * FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 'Smith' AND (SELECT COUNT(*) FROM taughtBy WHERE taughtBy.p_id = person.p_id)) AND taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 'Johnson' AND (SELECT COUNT(*) FROM taughtBy WHERE taughtBy.p_id = person.p_id))"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the id of the professor who teaches a course in the 3rd level?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person WHERE professor = (SELECT p_id FROM taughtBy, course WHERE taughtBy.course_id = course.course_id AND course.courseLevel = '3rd' LIMIT 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor with more than 10 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 10 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching courses in the 200-level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.professor as professor FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel LIKE '200%'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a minimum of 5 years of experience in their field?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course with the course ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for 2 years or more?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND CAST(p.yearsInProgram AS INTEGER) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which course level has more courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT courseLevel, COUNT(*) FROM course GROUP BY courseLevel ORDER BY COUNT(*) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a person who has a position of 'Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who is in their first year of the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'professor' AND person.inPhase = 'first year'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of all the courses taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT course_id FROM course NATURAL JOIN taughtBy WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE yearsInProgram LIKE '%5%')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have also taught courses with the course level 'Advanced'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 1) AND course.course_id = taughtBy.course_id AND course.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did a student named John teach?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.student = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'yearsInProgram' AND LENGTH(p.yearsInProgram) > LENGTH('5')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors in their first year in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram = 'First Year' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught at least two courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' GROUP BY c.course_id, c.courseLevel HAVING COUNT(c.course_id) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a specific professor?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor=1)"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that a professor who has advised at least one student teaches?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.p_id IN (SELECT p_id FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course with a level greater than 'Intermediate'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.professor FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel > 'Intermediate'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.professor = (SELECT p_id FROM person WHERE professor='Smith')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have 'Assistant Professor' as their position?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Assistant Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches the highest-level courses?",
    "evidence": "",
    "SQL": "SELECT p_id, courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id GROUP BY p_id, courseLevel ORDER BY courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in their first year of teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.yearsInProgram = '1'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been teaching for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course at any level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'Professor' AND person.inPhase IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does the professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy WHERE taughtBy.p_id = 1 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has professor 1 taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id WHERE tb.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by students in the advanced level?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE course.courseLevel='advanced' AND person.hasPosition='student' AND taughtBy.p_id=person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching at the 'Advanced' level in the 'Software Engineering' course?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c, taughtBy t, person p WHERE c.courseLevel = 'Advanced' AND c.course_id = t.course_id AND t.p_id = p.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor in the junior level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'junior'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by the professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by the professors who have a position in the 'full time' level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'full time'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who teaches at an advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t INNER JOIN course c ON t.course_id = c.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a position in the computer science department?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Computer Science Department'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 2 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS t JOIN person AS p ON t.p_id = p.p_id JOIN course AS c ON t.course_id = c.course_id WHERE p.inPhase = 'yes' AND LENGTH(p.yearsInProgram) > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by professors who are in their first year in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram = '1' ORDER BY c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has been teaching for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught at least two courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id GROUP BY c.course_id, c.courseLevel HAVING COUNT(tb.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id = 1 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a professor teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does John teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.student = 0 AND p.professor = 1 AND p.hasPosition = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who are students in the same program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by professors who are not students in any courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c LEFT JOIN taughtBy t ON c.course_id = t.course_id LEFT JOIN person p ON t.p_id = p.p_id WHERE p.student IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course 'CS123'?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 'CS123'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '3' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with ID 1234 teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb WHERE tb.p_id = 1234 AND tb.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who have taught at least 3 courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN (SELECT p_id, COUNT(*) AS course_count FROM taughtBy GROUP BY p_id HAVING COUNT(*) >= 3) AS tb2 ON tb.p_id = tb2.p_id GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor Jones taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'Professor Jones'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the number of students who are taught by professors with the level of 'Freshman' in the 'Data Science' course?",
    "evidence": "",
    "SQL": "SELECT COUNT(*) FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Freshman' AND p.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor in the second phase of the program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND person.p_id = taughtBy.p_id AND person.inPhase = 'second' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a professor has taught?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have more than 5 years of experience in their respective programs?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM taughtBy T INNER JOIN person P ON T.p_id = P.p_id INNER JOIN course C ON T.course_id = C.course_id WHERE P.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor that has taught a course of level 'Advanced'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t WHERE c.courseLevel='Advanced' AND t.course_id=c.course_id AND t.p_id IN (SELECT p_id FROM person WHERE hasPosition='Professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= '5' AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by Professor Doe?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'Doe' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor with p_id 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON p.p_id = t.p_id WHERE p.p_id = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with 'phD' as their highest degree?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition='Professor' AND person.yearsInProgram='phD'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5 AND person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a professor who teaches at level 3 advise?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel = '3' AND p.professor IS NOT NULL AND p.p_id IN (SELECT p_id_dummy FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 2 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND IFNULL(p.yearsInProgram, 0) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE p.p_id = t.p_id AND c.course_id = t.course_id AND (SELECT COUNT(*) FROM taughtBy WHERE p.p_id = taughtBy.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has been in the program for more than 4 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '4' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have also advised students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND exists (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What course is Professor X teaching in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.courseLevel, c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.p_id IN (SELECT p_id FROM person WHERE professor = 1) AND c.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the course levels taught by a professor who has advised a student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND person.hasPosition='Professor' AND EXISTS (SELECT 1 FROM advisedBy, person WHERE advisedBy.p_id = person.p_id AND person.p_id = taughtBy.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been a professor for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the course level of 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE c.courseLevel = 'Beginner' AND t.p_id = p.p_id AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a certain number of years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.yearsInProgram FROM course c, taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.yearsInProgram >= '5' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor with the student ID 1?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE student = 1) AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have professors who have taught a course of level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE professor = 1) AND c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p_id FROM taughtBy, course WHERE taughtBy.course_id = course.course_id AND course.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND EXISTS (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = person.p_id) GROUP BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised a student in the last two years?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'last two years' AND p.p_id IN (SELECT p_id_dummy FROM advisedBy ab WHERE p_id = p.p_id) ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor X teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE hasPosition='professor' AND p_id IN (SELECT p_id FROM person WHERE professor !=0))"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor with the name 'John'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.student IS NULL AND p.professor IS NOT NULL AND p.hasPosition IS NOT NULL AND p.p_id IN (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a person with the professor ID of 2 teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id WHERE tb.p_id = 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor has taught the most courses at the university?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition, COUNT(t.course_id) AS course_count FROM taughtBy t JOIN person p ON t.p_id = p.p_id GROUP BY p.hasPosition ORDER BY course_count DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who advises at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student IS NOT NULL))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is the professor who has taught 'Introduction to Databases' for more than 5 years teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND c.course_id IN (SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE yearsInProgram > '5 years'))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor who has been teaching for more than 5 years and has more than 10 students in their phase currently teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5 AND p.student > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has professor John taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE p.p_id = t.p_id AND p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by the professor who teaches 'Machine Learning'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE taughtBy.p_id = person.p_id AND course.course_id = taughtBy.course_id AND person.student = 'n' AND person.professor = 'y' AND course.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have at least 2 students in their advisees?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND (SELECT COUNT(*) FROM advisedBy ab WHERE ab.p_id = p.p_id) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught the course with course ID 1?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor FROM person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor John taught?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by a student that has been in a specific phase for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'student' AND p.inPhase IS NOT NULL AND length(p.inPhase) > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have 'professor' as their hasPosition?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND person.p_id = taughtBy.p_id AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in phase 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a professor in their advising list?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person AS p ON taughtBy.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.p_id IN (SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE p.hasPosition = 'Professor'))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram>'5'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach a course with 'Level 3'?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Level 3' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor Johnson teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 'Johnson')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has taught at least 2 courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id GROUP BY t.course_id, c.courseLevel HAVING COUNT(t.p_id) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for 5 or more years?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM course C, taughtBy T, person P WHERE P.p_id = T.p_id AND P.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with 'yearsInProgram' more than 3?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' GROUP BY c.course_id, c.courseLevel HAVING COUNT(t.course_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.inPhase='Done' AND p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with a position that is not a student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, person, course WHERE taughtBy.p_id = person.p_id AND person.hasPosition != 'student' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE student = '1')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who are in their first year of the program?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.yearsInProgram = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'Professor' AND taughtBy.course_id IN (SELECT advisedBy.p_id_dummy FROM advisedBy, person WHERE person.p_id = advisedBy.p_id_dummy AND person.hasPosition = 'Student') GROUP BY course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = p.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching courses with a level of 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT p_id as professor_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of the course with level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > 5 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who advises a student in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS t JOIN person AS p ON t.p_id = p.p_id JOIN course AS c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND EXISTS (SELECT 1 FROM advisedBy AS a WHERE a.p_id = p.p_id AND a.p_id_dummy IS NOT NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with courseLevel 'Undergraduate' teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 1 AND c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does the professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id IN (SELECT p_id FROM person WHERE p_id = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a PhD?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 1 AND (SELECT COUNT(*) FROM person p2 WHERE p2.p_id = p.p_id AND p2.hasPosition = 'PhD') > 0"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by professors who are also students in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '3' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by all professors who advise students in Phase 1?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy NATURAL JOIN person WHERE person.hasPosition = 'student' AND person.inPhase = 'Phase 1' GROUP BY taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who have advised the students with professor 'p_id' = 1?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by Professor with Professor ID 1?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id from person where professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 3 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '3' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of professors who teach courses with a level of 'Introductory'?",
    "evidence": "",
    "SQL": "SELECT p.student, p.professor, c.courseLevel FROM person p INNER JOIN taughtBy tb ON p.p_id = tb.p_id INNER JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Introductory'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > '3' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with p_id 1 teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND CAST(p.yearsInProgram AS REAL) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has taught more than one course?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy WHERE p_id IN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(*) > 1) AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a student currently enrolled in?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy WHERE p_id IN (SELECT student FROM person) AND taughtBy.course_id IN (SELECT course_id FROM person WHERE hasPosition='student')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor Smith taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught at least one course in the 'advanced' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'advanced' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the course level as 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a person who has been a professor for 2 years or more?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND yearsInProgram >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What course has Professor Smith as its instructor?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.professor = 'Professor Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught which courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.p_id, p.professor FROM course c, person p, taughtBy t WHERE c.course_id = t.course_id AND p.p_id = t.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by professors who are in the same program phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, person p, taughtBy tb WHERE c.course_id = tb.course_id AND p.p_id = tb.p_id AND p.hasPosition = p.inPhase"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least one course at the master's level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, c.course_id FROM course c, taughtBy t WHERE c.course_id = t.course_id AND t.p_id IN (SELECT p_id FROM person WHERE p_id IN (SELECT professor FROM person WHERE courseLevel = 'master') AND hasPosition IS NOT NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is advising at least one student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL AND p.p_id IN (SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student IS NOT NULL))"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught at least one course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p_id AS professor FROM taughtBy GROUP BY p_id HAVING COUNT(course_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in Phase 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'Phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the name of \"John Smith\"?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor IS NOT NULL AND person.student IS NULL AND person.professor LIKE '%John Smith%'"
  },
  {
    "db_id": "computer_student",
    "question": "What course has been taught by the most professors?",
    "evidence": "",
    "SQL": "SELECT course_id, COUNT(*) as count FROM taughtBy GROUP BY course_id ORDER BY count DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT * FROM course WHERE course_id IN (SELECT course_id FROM taughtBy, person WHERE person.yearsInProgram > 5 AND taughtBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with id 123 taught?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who advised at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 1 AND p.p_id IN (SELECT p_id FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= '5' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is John taught?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = (SELECT p_id FROM person WHERE p_id = 'John') AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 3 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS t JOIN course AS c ON t.course_id = c.course_id JOIN person AS p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has professor with the ID 1 taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 2 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE yearsInProgram LIKE '>%') ORDER BY course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of the course that Professor John has taught?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach a course with course level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p_id AS professor FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been advising students for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who teaches courses with a high level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'high' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a 'Ph.D.' level in the course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM person WHERE p_id IN (SELECT p_id FROM advisedBy))"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who teaches at least one course at a beginner level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Beginner' OR p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has a position in Phase 1 and has been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course_id FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Phase 1' AND substr(person.yearsInProgram, 1, length(person.yearsInProgram) - 1) > 2"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches the course with id 1?",
    "evidence": "",
    "SQL": "SELECT person.professor FROM course, taughtBy, person WHERE course.course_id = 1 AND course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the courses taught by a student who has been in the program for more than 1 year?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE yearsInProgram='moreThan1')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor who has the most students?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE (SELECT COUNT(*) FROM person WHERE student = p.p_id) = (SELECT MAX(count) FROM (SELECT COUNT(*) AS count FROM person WHERE student = p.p_id GROUP BY student) AS temp) GROUP BY courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with a PhD in a specific field?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'PhD'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a minimum of 5 years in a program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught at least one course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p_id FROM person NATURAL JOIN taughtBy"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor 1 teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which course has been taught by the professor who is also advising students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id IN (SELECT p_id FROM advisedBy) AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor who has been in the program for more than 3 years teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '3' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with p_id = 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = (SELECT p_id FROM person WHERE p_id = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Which students are advised by professors who teach courses at the level of 'Higher'",
    "evidence": "",
    "SQL": "SELECT s.student FROM person s JOIN advisedBy a ON s.p_id = a.p_id JOIN person p ON a.p_id_dummy = p.p_id JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Higher' GROUP BY s.student"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have taught at least one course in a beginner level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= '5' AND person.student = '0' AND person.professor = '1' AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are also students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.student='true'"
  },
  {
    "db_id": "computer_student",
    "question": "Who has taught the most courses as a professor?",
    "evidence": "",
    "SQL": "SELECT p.student, COUNT(c.course_id) AS count FROM person p, course c, taughtBy t WHERE p.p_id = t.p_id AND c.course_id = t.course_id GROUP BY p.student ORDER BY count DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor Smith taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.student IS NULL AND p.p_id = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor who has advised the most students?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE hasPosition = 'professor' GROUP BY courseLevel ORDER BY (SELECT COUNT(*) FROM person JOIN advisedBy ON person.p_id = advisedBy.p_id WHERE hasPosition = 'professor') DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by students in their 2nd year of the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = '2nd year' AND person.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by the professor who advises the most students?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN (SELECT p_id FROM advisedBy GROUP BY p_id ORDER BY COUNT(p_id) DESC LIMIT 1) a ON t.p_id = a.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors advise students in the 'advanced' level course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.hasPosition AS 'Professors' FROM person p, advisedBy ab, course c WHERE p.p_id = ab.p_id_dummy AND ab.p_id = p.p_id AND c.course_id = ab.p_id AND c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'yes' AND exists (SELECT * FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with ID 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy tb ON c.course_id = tb.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND length(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course that is not taught by any professor?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course LEFT JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.course_id IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram>'5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught 'Introduction to Computer Science'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor FROM person JOIN taughtBy ON person.p_id = taughtBy.p_id WHERE taughtBy.course_id = (SELECT course_id FROM course WHERE course.courseLevel = 'Introduction to Computer Science') AND taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have been a professor for more than 10 years?",
    "evidence": "",
    "SQL": "SELECT distinct course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in a particular phase of the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.inPhase IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are advising at least one student?",
    "evidence": "",
    "SQL": "SELECT professor FROM person WHERE student IS NOT NULL GROUP BY professor HAVING COUNT(student) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught 'CS 101'?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND course.courseLevel = 'CS 101' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by professors who are also students?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE t.p_id = p.p_id AND p.hasPosition = 'Student' AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.p_id IN (SELECT p_id FROM advisedBy WHERE p_id_dummy IS NOT NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the highest course level offered by a professor who has taught a course in the past?",
    "evidence": "",
    "SQL": "SELECT DISTINCT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course 'Introduction to Software Engineering'?",
    "evidence": "",
    "SQL": "SELECT p.student, p.hasPosition FROM person p JOIN taughtBy t ON p.p_id = t.p_id WHERE t.course_id = (SELECT course_id FROM course WHERE courseLevel = 'Introduction to Software Engineering') AND p.hasPosition = 'TA'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students from the software engineering phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'software engineering' AND NOT EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id AND ab.p_id_dummy IS NULL)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor who teaches courses with 'Intermediate' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'Intermediate'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course with the highest level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course ORDER BY course.courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE t.p_id = p.p_id AND p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.p_id, p.hasPosition FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which students are taught by professors who advise more than one student?",
    "evidence": "",
    "SQL": "SELECT s.p_id FROM person s JOIN taughtBy t ON s.p_id = t.p_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' GROUP BY s.p_id HAVING COUNT(s.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What course does Professor X teach?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel, course.course_id FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with a position 'Senior Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Senior Professor' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram >= '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has professor 'p1' taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 'p1')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t, course c WHERE t.course_id = c.course_id AND c.courseLevel = 'advanced' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '2' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is person with id 2 teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id WHERE t.p_id = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '3' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by the professor with ID 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.p_id = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor taught at the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND c.courseLevel='advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 10 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by professor with the most years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram = (SELECT MAX(yearsInProgram) FROM person) ORDER BY c.courseLevel ASC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are also students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.student = 'true'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of a course taught by a professor who has advised more than one student?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'professor' AND (SELECT COUNT(*) FROM advisedBy WHERE advisedBy.p_id = person.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT p.professor AS professor FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which course is currently taught by a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '5' GROUP BY course.course_id, course.courseLevel ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE student = 'true')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the id of the person who taught a course in the master level?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person NATURAL JOIN taughtBy NATURAL JOIN course WHERE courseLevel='master'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is advised by another professor?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id JOIN advisedBy a ON p.p_id = a.p_id_dummy WHERE p.hasPosition = 'professor' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the person with the highest number of courses taught?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.p_id IN (SELECT p_id FROM person GROUP BY p_id ORDER BY (SELECT COUNT(*) FROM taughtBy WHERE taughtBy.p_id = person.p_id) DESC LIMIT 1) ORDER BY course.course_id ASC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with 5 years or more in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.inPhase = 'yearsInProgram' AND p.yearsInProgram >= '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the id of the course with the highest level?",
    "evidence": "",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = (SELECT MAX(courseLevel) FROM course)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a certain number of years in a program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram = '3' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a position in Phase 2?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.inPhase = 'Phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "What course does the professor who advises the most students teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id GROUP BY c.course_id, c.courseLevel ORDER BY COUNT(p.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches courses for students at the advanced level?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition AS 'Role', p.professor AS 'Professor' FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'advanced' AND p.student = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 2 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 2 GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have at least 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' AND p.hasPosition='professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the number of professors who have taught a course?",
    "evidence": "",
    "SQL": "SELECT COUNT(*) FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id WHERE hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition LIKE '%Ph.D.%'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.inPhase IS NULL AND LENGTH(p.yearsInProgram) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by professors having a 'tenured' position?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'tenured'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by the professors in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'advanced' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram >= 3 GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND EXISTS (SELECT * FROM advisedBy ab WHERE ab.p_id = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught for 3 or more years in this university?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy tb, person p WHERE c.course_id = tb.course_id AND p.p_id = tb.p_id AND p.yearsInProgram >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has advised a student with a certain course level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'certain_course_level'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c INNER JOIN taughtBy tb ON c.course_id = tb.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE p.yearsInProgram >= 5 AND p.p_id = tb.p_id AND c.course_id = tb.course_id ORDER BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by professor with id 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith' AND hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by the professor with id 1?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a position in the computer science department?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition LIKE '%Computer Science%'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '2' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the name of the professor who teaches 'Introduction to Computer Science'?",
    "evidence": "",
    "SQL": "SELECT person.hasPosition FROM person, taughtBy, course WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND course.courseLevel = 'Introduction to Computer Science'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor who advises a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN advisedBy ab ON t.p_id = ab.p_id_dummy WHERE ab.p_id = (SELECT p_id FROM person WHERE hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the second year of the program?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM course C JOIN taughtBy T ON C.course_id = T.course_id JOIN person P ON T.p_id = P.p_id WHERE P.inPhase = 'second year'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor who taught a course for at least two years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id AND person.yearsInProgram LIKE '%2%'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors in the graduate level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'graduate' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor with the first name 'Alice'?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor='Alice')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.hasPosition='professor' AND tb.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been advising students for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.yearsInProgram > '3'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '3' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE professor = (SELECT p_id FROM person WHERE hasPosition = 'Professor Smith'))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by students?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.student = 'TRUE' AND p.hasPosition = 'FALSE'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON p.p_id = t.p_id WHERE p.hasPosition = 'professor' AND p.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course with a level of 'intro'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'intro'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= '5' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'yearsInProgram' AND cast(p.yearsInProgram AS INTEGER) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a professor who taught a course in 'CS100' teach?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE p_id IN (SELECT p_id FROM taughtBy WHERE course_id = 'CS100'))"
  },
  {
    "db_id": "computer_student",
    "question": "What is the courseLevel of the course taught by the professor with the student having 'Computer Science' as his or her hasPosition?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Computer Science'"
  },
  {
    "db_id": "computer_student",
    "question": "What course has a professor that also has a student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c, person p, taughtBy tb WHERE p.p_id = tb.p_id AND tb.course_id = c.course_id AND p.hasPosition = 'student' AND p.p_id IN (SELECT p2.p_id FROM person p2, person p3, advisedBy ab WHERE p2.p_id = ab.p_id_dummy AND ab.p_id = p3.p_id AND p3.hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching courses that have been taught by professors with a certain course level?",
    "evidence": "",
    "SQL": "SELECT p.professor as 'Professor' FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'certain_level' GROUP BY p.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has been in a program for at least 3 years?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level of the courses taught by a professor with more than 5 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT AVG(courseLevel) FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor in the senior level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'senior'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 5 years and have a position of 'Full Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Full Professor' AND p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the courses taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' GROUP BY course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a certain number of years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5 AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy ab)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a person with 'Professor' as their position?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT * FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with professor ID 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.student = 1 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person AS p ON taughtBy.p_id = p.p_id WHERE p.hasPosition='student'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = '1'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the intermediate level?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE course.courseLevel = 'Intermediate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.p_id = 1 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors in the highest level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = (SELECT MAX(courseLevel) FROM course)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than one student?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'Professor' AND p.student > 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have only one instructor?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id GROUP BY course.course_id HAVING COUNT(taughtBy.p_id) = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has taught for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='professor' AND person.yearsInProgram>'2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a specific professor teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by a professor who has taught a course at a beginner level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1 AND c.courseLevel = 'Beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did Professor Jane teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 'Jane')"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a professor with more than 5 years of experience in the program teaches?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor has taught the most number of courses?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person WHERE EXISTS (SELECT 1 FROM taughtBy WHERE taughtBy.p_id = person.p_id) GROUP BY p_id ORDER BY (SELECT COUNT(*) FROM taughtBy WHERE taughtBy.p_id = person.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor who advises the most number of students in the 'Bachelor' phase?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.inPhase = 'Bachelor' GROUP BY course.courseLevel ORDER BY COUNT(person.p_id) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > '5' AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has been in the program for 3 years and teaches a course that is part of the 'graduate' level?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.yearsInProgram = '3' AND course.courseLevel = 'graduate' AND EXISTS (SELECT * FROM person WHERE person.p_id = taughtBy.p_id AND person.hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What are the professors that have taught a course at a level of 'masters'?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition AS professor, p.p_id AS professor_id FROM person AS p JOIN taughtBy AS t ON p.p_id = t.p_id JOIN course AS c ON t.course_id = c.course_id WHERE c.courseLevel = 'masters' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.student IS NULL AND p.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors having more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='Professor' AND CAST(p.yearsInProgram AS INTEGER) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in Phase 3?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = 'Phase 3'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who are also advisors of at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id = (SELECT p_id from person where hasPosition = 'Professor' and student is null) and course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor with the course level 'Advanced' taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE person.professor = 'TRUE' AND course.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor of a professor?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM course c, person p, taughtBy t WHERE p.p_id = t.p_id and t.course_id = c.course_id and p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor='Professor Smith' AND p.student IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are currently teaching a course at the beginning phase and have been in the program for at least 3 years?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM person p, taughtBy t WHERE p.p_id = t.p_id AND p.inPhase = 'beginning' AND p.yearsInProgram >= '3' GROUP BY p.professor"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of course taught by a professor?",
    "evidence": "",
    "SQL": "SELECT c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What course is currently taught by the professor who has taught the most courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN (SELECT p_id, COUNT(*) as total_courses FROM taughtBy GROUP BY p_id ORDER BY total_courses DESC LIMIT 1) t2 ON t.p_id = t2.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with 5 or more years in program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE LENGTH(person.yearsInProgram) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have both a course level of 'undergraduate' and are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'undergraduate' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by students who have completed their program?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram = 'completed' AND p.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 'Smith' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in their last year of the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'lastYear' AND p.inPhase = 'lastYear'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, person.hasPosition FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than one student in their course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.student > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who are in their first year of a program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'First' AND p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel, course.course_id FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level of all courses that were taught by professors who have a professor position?",
    "evidence": "",
    "SQL": "SELECT AVG(courseLevel) FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > 5 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has more than 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5 AND course.course_id = taughtBy.course_id ORDER BY course.course_id ASC"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT p_id FROM person WHERE p_id IN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(*) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by the professor who advises the most students?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN (SELECT p_id, COUNT(*) AS num_students FROM advisedBy GROUP BY p_id ORDER BY num_students DESC LIMIT 1) ab ON tb.p_id = ab.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by professors with more than 2 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '2' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON p.p_id = t.p_id WHERE p.yearsInProgram > 5 ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by a student who has the most years in a program?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram = (SELECT MAX(yearsInProgram) FROM person) AND person.student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of all professors who teach a course at a level of 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition FROM person p, taughtBy t WHERE p.p_id = t.p_id AND t.course_id IN (SELECT course_id FROM course WHERE courseLevel = 'Undergraduate')"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught courses with level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT person.hasPosition FROM person, course, taughtBy WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND course.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5 AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND LENGTH(person.yearsInProgram) > 5 AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who is also a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL AND p.student IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with less than 3 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram < 3"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course ID of the course that was taught by the professor with the highest level in the department?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy NATURAL JOIN person WHERE professor = 'highest level' ORDER BY course_id ASC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor Smith taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id WHERE tb.p_id IN (SELECT p_id FROM person WHERE professor = 'Smith')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise more than one student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition = 'professor' AND (SELECT COUNT(*) FROM advisedBy WHERE advisedBy.p_id = person.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor with ID 3?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor=3)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith' AND hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the 'Faculty' level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, course.course_id as ID FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND course.courseLevel = 'Faculty'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors in the 'Higher' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Higher'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the number of students in the database?",
    "evidence": "",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What professors have taught courses?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor X teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that Professor John has taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have advised students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy ab)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the highest level of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id ORDER BY person.yearsInProgram DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What professors teach a course at a high level?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'High'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor who has been a professor for more than 5 years taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 3 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor John Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND person.professor = 'John Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a student in the first phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.hasPosition = 'student' AND p.inPhase = 'first' AND t.p_id = p.p_id AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have professors who are also students?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor IS NOT NULL AND p.student IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have been in the program for 2 years?",
    "evidence": "",
    "SQL": "SELECT * FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram = '2' AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has a position of 'Full Professor'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Full Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in the \"Has Position\" category?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Has Position'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.yearsInProgram > 5 AND t.p_id = p.p_id AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by Professors who have more than 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a student named 'John' is advised by?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, advisedBy ab, person p WHERE p.student = ab.p_id_dummy AND p.p_id = ab.p_id AND ab.p_id_dummy = (SELECT p_id FROM person WHERE student='John')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a person who is also a student?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.student = 'TRUE'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least one course with 'Intermediate' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition IS NOT NULL AND c.courseLevel = 'Intermediate' GROUP BY c.course_id, c.courseLevel HAVING COUNT(DISTINCT tb.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by professors who have advised at least two students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.p_id = t.p_id AND p.p_id IN (SELECT p_id_dummy FROM advisedBy GROUP BY p_id_dummy HAVING COUNT(*) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5 GROUP BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has taught a course of level 3 or higher?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND course.courseLevel >= '3'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor with 'Dr.' in their hasPosition?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE person.hasPosition LIKE '%Dr%' AND person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a professor has taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a position as 'Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a professor's ID in the range of 100 to 200?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.p_id BETWEEN 100 AND 200"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in Phase 1?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM taughtBy, course, person WHERE course.course_id = taughtBy.course_id AND person.p_id = taughtBy.p_id AND person.inPhase = 'Phase 1' AND person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE t.p_id = p.p_id AND p.hasPosition = 'professor' AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.professor = '1'"
  },
  {
    "db_id": "computer_student",
    "question": "What professors taught CS 101 in the past?",
    "evidence": "",
    "SQL": "SELECT person.professor as 'Professor' FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND person.p_id = taughtBy.p_id AND course.course_id = 'CS 101' AND yearsInProgram != 'Freshman'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who are the professors that teach a course with a level that is not 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT distinct p.p_id FROM taughtBy t JOIN person p ON t.p_id = p.p_id WHERE t.course_id IN (SELECT course_id FROM course WHERE courseLevel != 'Beginner')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the total number of courses taught by a professor with the courseLevel as 'graduate'",
    "evidence": "",
    "SQL": "SELECT count(DISTINCT course.course_id) FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND course.courseLevel = 'graduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'Smith' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of the professors who have taught at least one course?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor FROM person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been a professor for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '2' ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE yearsInProgram >= 5 AND hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been a student for 3 years or more?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, person, course WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram >= 3 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors in the graduate level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'graduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor X?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'X'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor with 5 or more years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of course ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses has a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses has professor with id 1 taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a professor position?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in their first year in the program?",
    "evidence": "",
    "SQL": "SELECT * FROM taughtBy t INNER JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'first year'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have 'full' as their courseLevel?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'full'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that professor with id 1 has taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by students with more than 2 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '2'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE tb.course_id = c.course_id AND tb.p_id = p.p_id AND p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course that has the highest level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course ORDER BY course.courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a Ph.D.",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has a position in more than one phase?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE person.hasPosition LIKE '%,phase%') AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by Professor John?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE p_id IN (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in their final year of the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'final'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the course level 'introductory'? ",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND c.courseLevel='introductory'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a specific professor?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has a position of 'Chair'?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'Chair'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram >= 5 AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5' GROUP BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have a professor who has taught at least 5 courses?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id GROUP BY course.course_id, course.courseLevel HAVING COUNT(DISTINCT taughtBy.p_id) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > '5' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor who has taught at least 2 courses and has been a professor for more than 2 years teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND (SELECT COUNT(*) FROM taughtBy WHERE p.p_id = taughtBy.p_id) > 1 AND p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.yearsInProgram > '3'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE person.yearsInProgram > 5 AND person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught more than 2 courses?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id JOIN (SELECT p_id, COUNT(*) as count FROM taughtBy GROUP BY p_id HAVING COUNT(*) > 2) AS high_teaching_professors ON taughtBy.p_id = high_teaching_professors.p_id JOIN course ON taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course with a level of 'Intermediate' or higher?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel IN ('Intermediate', 'Advanced')"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that are taught by a professor who has more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have at least 5 years of experience in their program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram >='5'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses has Professor John taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.inPhase IS NOT NULL AND p.yearsInProgram = 'PhD' AND p.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who are advisors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, c.course_id FROM course c, person p, taughtBy t WHERE p.p_id = t.p_id AND p.hasPosition = 'advisor' AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a person who is a professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What course has been taught by a professor who has advised a student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id JOIN advisedBy ab ON p.p_id = ab.p_id_dummy WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been professors for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for at least 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= '3'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of all courses taught by a professor who has been teaching for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.p_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching 'Introduction to Computer Science'?",
    "evidence": "",
    "SQL": "SELECT p.student, p.hasPosition, p.inPhase, p.yearsInProgram FROM person p JOIN taughtBy t ON p.p_id = t.p_id WHERE t.course_id = (SELECT c.course_id FROM course c WHERE c.courseLevel = 'Introduction to Computer Science') AND p.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor with name 'John'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.student IS NULL AND person.hasPosition='Professor' AND person.professor='John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least one course at level 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What course has the most professors teaching it?",
    "evidence": "",
    "SQL": "SELECT course_id FROM course WHERE (SELECT COUNT(p_id) FROM taughtBy WHERE course_id = taughtBy.course_id) = (SELECT MAX(count) FROM (SELECT course_id, COUNT(p_id) AS count FROM taughtBy GROUP BY course_id) AS subquery)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '5' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a position that includes 'Senior'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition LIKE '%Senior%'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition LIKE '%Ph.D.%'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor 1?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course 'Computer Science 101'?",
    "evidence": "",
    "SQL": "SELECT p.professor AS professor FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id WHERE tb.course_id = (SELECT course_id FROM course WHERE courseLevel = '101')"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor has taught the most courses?",
    "evidence": "",
    "SQL": "SELECT p_id, COUNT(*) as course_count FROM taughtBy GROUP BY p_id ORDER BY course_count DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who have been advising students for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, person p, taughtBy tb, advisedBy ab WHERE c.course_id = tb.course_id AND p.p_id = tb.p_id AND p.inPhase > '5' AND ab.p_id = p.p_id AND tb.p_id = ab.p_id_dummy"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND (SELECT COUNT(*) FROM advisedBy WHERE advisedBy.p_id = person.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Who are the professors in the database?",
    "evidence": "",
    "SQL": "SELECT professor FROM person WHERE hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in a Ph.D. program for at least 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram >= '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor in the second year?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'second' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor John teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND person.hasPosition = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor 1234567 teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id = 1234567"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor named John?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition, p.inPhase, p.yearsInProgram FROM course c, taughtBy t, person p WHERE t.p_id = p.p_id AND c.course_id = t.course_id AND p.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course at level 'Intermediate'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Intermediate' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students in the same course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c, taughtBy t, advisedBy a WHERE c.course_id = t.course_id AND t.p_id = a.p_id AND a.p_id_dummy IN (SELECT p_id FROM person WHERE yearsInProgram = 'same_as_in_phase') GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students in the department?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c, taughtBy t, advisedBy a, person p WHERE c.course_id = t.course_id AND t.p_id = a.p_id_dummy AND a.p_id = p.p_id AND p.professor='Y'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor with the id 1?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in the second phase?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'Phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches the course with courseLevel as 'Intermediate'?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy, course WHERE course.courseLevel = 'Intermediate' AND course.course_id = taughtBy.course_id AND taughtBy.p_id = p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor X taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by professors with a position of 'Full Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Full Professor' ORDER BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been a professor for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb INNER JOIN course c ON tb.course_id = c.course_id INNER JOIN person p ON tb.p_id = p.p_id WHERE p.inPhase IS NULL AND p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor teaches the most courses?",
    "evidence": "",
    "SQL": "SELECT p_id, COUNT(*) FROM taughtBy GROUP BY p_id ORDER BY COUNT(*) DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course in the 'Third Year' level?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel, P.hasPosition, P.inPhase, P.yearsInProgram FROM course C, person P, taughtBy T WHERE C.course_id = T.course_id AND P.p_id = T.p_id AND C.courseLevel = 'Third Year'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been advising students for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Who are the professors that have taught at least one course?",
    "evidence": "",
    "SQL": "SELECT p.p_id, p.professor FROM person p JOIN taughtBy t ON p.p_id = t.p_id GROUP BY p.p_id HAVING COUNT(t.course_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has advised at least one student?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND (SELECT COUNT(*) FROM advisedBy WHERE advisedBy.p_id = person.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have a course level of 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course WHERE course.courseLevel = 'Beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor John teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.professor = 'Professor John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been teaching for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a specific professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id WHERE t.p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "Who is teaching a course of level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT person.professor as 'Professor' FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE course.courseLevel = 'Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that have been taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has a Ph.D.?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.hasPosition = 'Ph.D.'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors taught a course with courseLevel 'Beginner'?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'Beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that Professor Smith taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND p_id IN (SELECT p_id FROM person WHERE professor = 'Smith')"
  },
  {
    "db_id": "computer_student",
    "question": "Who is teaching the 'Introduction to Artificial Intelligence' course?",
    "evidence": "",
    "SQL": "SELECT p.student || ' ' || p.professor AS name FROM person p, taughtBy tb WHERE tb.course_id IN (SELECT course_id FROM course WHERE courseLevel = 'Introduction to Artificial Intelligence') AND p.p_id = tb.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor John teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who have been in a program for 2 years or more?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram >= 2 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the 'Data Structures' course?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course WHERE course.course_id = (SELECT taughtBy.course_id FROM taughtBy WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE student = 0))"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor in the advanced level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught courses with level 'Advanced'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor, course.courseLevel FROM person JOIN taughtBy ON person.p_id = taughtBy.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of a course taught by a professor with exactly two years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND LENGTH(person.yearsInProgram) = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t, person p, course c WHERE p.yearsInProgram > 5 AND t.p_id = p.p_id AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE student = 'TRUE')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the 'Professor' role?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor with id 3 taught?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 3"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE p_id IN (SELECT p_id FROM person WHERE professor = 'Smith')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught at least 2 courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(course_id) > 1) t ON tb.p_id = t.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.student = NULL AND p.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is professor with ID 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = (SELECT p_id FROM person WHERE professor = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of professors who are teaching a course?",
    "evidence": "",
    "SQL": "SELECT p.hasPosition as Professor FROM person p, taughtBy t WHERE p.p_id = t.p_id GROUP BY p.hasPosition"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has been in the program for more than 5 years and also advises a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram > '5' AND EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least 3 years in a program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor with a position 'Professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a professor teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor X taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 'Professor X') AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram >= '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(course_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a position and is in Phase 1?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition IS NOT NULL AND p.inPhase = 'Phase 1'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has advised at least two students?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id_dummy) >= 2)"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have been in the program for 3 years or less?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.course_id = course.course_id AND taughtBy.p_id = person.p_id AND yearsInProgram <= '3'"
  },
  {
    "db_id": "computer_student",
    "question": "Who are the professors of courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor FROM person, taughtBy, course WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND course.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been advising at least two students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE c.course_id = tb.course_id AND tb.p_id = p.p_id AND p.hasPosition = 'professor' AND p.p_id IN (SELECT distinct a.p_id FROM advisedBy a GROUP BY a.p_id HAVING count(a.p_id) >= 2)"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught all courses?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(DISTINCT course_id) = (SELECT COUNT(*) FROM course)"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that are taught by a professor who has a position that is not empty?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id, p.professor FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of course with id 2?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor 'Pete' taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Pete'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught more than one course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.hasPosition = 'Professor' GROUP BY tb.course_id, c.courseLevel HAVING COUNT(tb.course_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course with the highest courseLevel?",
    "evidence": "",
    "SQL": "SELECT course_id, courseLevel FROM course ORDER BY courseLevel DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a person with the courseLevel of 'Bachelor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Bachelor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor with the most years in a program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram = (SELECT MAX(yearsInProgram) FROM person WHERE person.hasPosition = 'professor')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor 'John' teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course with id 1?",
    "evidence": "",
    "SQL": "SELECT p.student AS 'Name' FROM person AS p, taughtBy AS t WHERE t.course_id = 1 AND p.p_id = t.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor John?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id = (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who are also students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition = 'student' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '5' ORDER BY c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Professor Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of course with ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who is in their second year in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE p.inPhase = 'second year' AND p.p_id = t.p_id AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor with ID 2?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = 2)"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of students who are advised by a professor who teaches a course with a course level of 'Intermediate'?",
    "evidence": "",
    "SQL": "SELECT p.student FROM person p, advisedBy ab, taughtBy tb, course c WHERE p.p_id = ab.p_id AND ab.p_id_dummy = tb.p_id AND tb.course_id = c.course_id AND c.courseLevel = 'Intermediate'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the courses with 'Data Structures' level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.student, p.p_id FROM person p JOIN taughtBy t ON p.p_id = t.p_id JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'Data Structures'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND LENGTH(person.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been advising students for more than two years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy AS tb JOIN course AS c ON tb.course_id = c.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > '2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught by more than 3 courses?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.student FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE (SELECT COUNT(*) FROM taughtBy WHERE p_id = p.p_id) > 3 AND p.student IS TRUE"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor who has more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught at least one course at the 300 level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, person.p_id FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE person.hasPosition='professor' AND course.courseLevel='300'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by the professors who have a course level of 'Postgraduate'?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Postgraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors with at least 5 years of experience in a Ph.D. program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > 5 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the advanced level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND course.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor taught who is also a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, person p, taughtBy tb WHERE p.p_id = tb.p_id AND tb.course_id = c.course_id AND p.student = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by professors with more than 5 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by Professor XYZ?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id WHERE tb.p_id IN (SELECT p_id FROM person WHERE professor = 'Professor XYZ')"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by the professors in the 'Advanced' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t WHERE c.courseLevel = 'Advanced' AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors with more than 3 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel, course.course_id FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a person with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '5' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, person p, taughtBy tb WHERE p.yearsInProgram > '5' AND p.p_id = tb.p_id AND c.course_id = tb.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a certain level of expertise?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by professor having the ID 2?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id AND person.professor = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a specific professor taught in the past three years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= '3' ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a minimum of 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'yearsInProgram' AND LENGTH(p.yearsInProgram) >= 5 GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What course has been taught by the professor with the highest number of years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, person p, taughtBy t WHERE c.course_id = t.course_id AND p.p_id = t.p_id AND p.yearsInProgram = (SELECT MAX(yearsInProgram) FROM person) ORDER BY c.course_id LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors with more than 3 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = 'YearsInProgram' AND LENGTH(p.yearsInProgram) > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the courses that a professor who advised more than 2 students teaches?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.p_id IN (SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id) > 2)"
  },
  {
    "db_id": "computer_student",
    "question": "What are the names of all professors who have taught at least one course in a program where at least one student is in the senior phase?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.student, p.hasPosition FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'Senior' AND p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level for courses taught by students in the program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='student' AND person.inPhase='yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor with the 'inPhase' as 'junior'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='professor' AND person.inPhase='junior'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN person p ON t.p_id = p.p_id JOIN course c ON t.course_id = c.course_id WHERE p.hasPosition = 'professor' AND CAST(REPLACE(p.yearsInProgram, 'year', '') AS INTEGER) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT person.professor AS 'Professor ID' FROM person, course, taughtBy WHERE person.p_id = taughtBy.p_id AND course.course_id = taughtBy.course_id AND course.courseLevel = 'advanced' GROUP BY person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the total number of professors?",
    "evidence": "",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM person WHERE professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught a course at the beginning of their first year at the university?",
    "evidence": "",
    "SQL": "SELECT * FROM course WHERE course_id IN (SELECT course_id FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id WHERE hasPosition='Professor' AND yearsInProgram='1')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in their respective programs?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of the course taught by a professor who has been in the program for more than 2 years and is in the Senior phase?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, person, taughtBy WHERE person.hasPosition = 'Professor' AND person.inPhase = 'Senior' AND yearsInProgram > 2 AND course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has John taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.professor = 'John'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id FROM taughtBy tb, course c, person p WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5 AND p.p_id = tb.p_id AND tb.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is the professor with ID 12345 teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 12345)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have a position that is not 'Student'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition != 'Student' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by the professor who has 'Professor' as their hasPosition?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who is teaching course with courseLevel as 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor FROM person, taughtBy WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id IN (SELECT course.course_id FROM course WHERE course.courseLevel = 'Undergraduate')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are also students in their own courses?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'student' AND p.inPhase = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have professors who have also advised students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'advisor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor with ID 1 teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 1) AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the introductory level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND course.courseLevel = 'Introductory'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by professors who are also students?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.student='yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor with more than 5 years in the program and has a professor who advises students in a course with a level of advanced?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE c.course_id = t.course_id AND t.p_id = p.p_id AND p.hasPosition='professor' AND p.yearsInProgram > 5 AND EXISTS (SELECT * FROM person p2, advisedBy a WHERE p2.p_id=a.p_id_dummy AND a.p_id=p.p_id AND p2.hasPosition='professor') AND EXISTS (SELECT * FROM course c2 WHERE c2.courseLevel='advanced' AND EXISTS (SELECT * FROM taughtBy t2 WHERE t2.p_id=p.p_id AND t2.course_id=c2.course_id))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught a course with a level of 'Master'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND course.course_id = taughtBy.course_id AND person.hasPosition = 'Professor' AND course.courseLevel = 'Master'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors who have taught at least one course for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy tb, person p WHERE tb.course_id = c.course_id AND tb.p_id = p.p_id AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.yearsInProgram > '5' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which students are advised by the professor who teaches 'Data Structures and Algorithms'?",
    "evidence": "",
    "SQL": "SELECT p.student FROM person p, advisedBy ab, taughtBy tb, course c WHERE tb.course_id = c.course_id AND tb.p_id = ab.p_id AND ab.p_id_dummy = p.p_id AND c.courseLevel = 'Data Structures and Algorithms'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses have been taught by a professor who has advised at least one student for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by the most experienced professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id GROUP BY tb.p_id, tb.course_id ORDER BY p.yearsInProgram DESC LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy, course, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '2' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id JOIN \"advisedBy\" ab ON p.p_id = ab.p_id AND ab.p_id_dummy IS NULL WHERE p.hasPosition = 'professor' GROUP BY c.course_id, c.courseLevel HAVING COUNT(ab.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor who has advised at least one student teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND EXISTS (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by professors who have at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the number of courses taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT COUNT(*) FROM taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram > '5' AND person.hasPosition='professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, person p, taughtBy t WHERE p.p_id = t.p_id AND p.inPhase IS NOT NULL AND p.yearsInProgram >= 5 AND c.course_id = t.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have the position of Lecturer?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Lecturer'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of course that a professor with id 1 teaches?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by the person with professor ID 1?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students that are currently in phase 3?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy AS tb INNER JOIN course AS c ON tb.course_id = c.course_id INNER JOIN person AS p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.inPhase = 'Phase 3' AND p.p_id IN (SELECT p_id FROM advisedBy WHERE hasPosition = 'Student')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have 'Assistant Professor' as their position?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Assistant Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are teaching a course with a course level of 'Advanced'? ",
    "evidence": "",
    "SQL": "SELECT p_id as professor FROM taughtBy t JOIN course c ON t.course_id = c.course_id WHERE c.courseLevel = 'Advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have not been taught by any professors?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c LEFT JOIN taughtBy tb ON c.course_id = tb.course_id WHERE tb.p_id IS NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses did Professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has professor with ID 1 taught?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id WHERE taughtBy.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor in the third level?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND c.courseLevel = 'third'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'professor' AND CAST(SUBSTR(person.yearsInProgram, 1, INSTR(person.yearsInProgram, '-')-1) AS INTEGER) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor with 'PhD' as their highest degree?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.hasPosition='Professor' AND person.yearsInProgram='PhD'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a position 'adjunct professor'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'adjunct professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > '3' GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with 5+ years of experience in a given phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 4 AND p.inPhase IS NOT NULL GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professor Smith?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "Which students are enrolled in the course with ID 1 and taught by a professor with a level of 'PhD'?",
    "evidence": "",
    "SQL": "SELECT p.student FROM person p, taughtBy tb, course c WHERE p.student = tb.p_id AND tb.course_id = c.course_id AND c.course_id = 1 AND c.courseLevel = 'PhD'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT * FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with 5+ years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' AND p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in a Ph.D. program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = 'Ph.D.' AND person.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors in their first year of position?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='First' AND p.inPhase='first year'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has a 'professor' position?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE p.p_id = tb.p_id AND p.hasPosition = 'professor' AND tb.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have at least 5 years of experience in a program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= '5' AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are also students in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'student'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have a position of 'Professor' in the Computer Science Department?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, person, taughtBy WHERE person.p_id = taughtBy.p_id AND person.hasPosition = 'Professor' AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in Level 1?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.p_id, p.professor FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Level 1'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor in a certain department known to teach?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, p.hasPosition FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by professors who taught at least one course at the 'Advanced' level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE course.course_id = taughtBy.course_id AND course.courseLevel = 'Advanced' GROUP BY course.course_id, course.courseLevel HAVING COUNT(DISTINCT taughtBy.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professor with highest level in person table?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = (SELECT MAX(p2.hasPosition) FROM person p2)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have a certain number of years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have more than one professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id GROUP BY c.course_id, c.courseLevel HAVING COUNT(t.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course in the 'Intro to Computer Science' course level?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id FROM taughtBy t, course c WHERE t.course_id = c.course_id AND c.courseLevel = 'Intro to Computer Science' GROUP BY c.course_id HAVING COUNT(DISTINCT t.p_id) > 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram >= '5' ORDER BY c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with a minimum of 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND length(p.yearsInProgram) >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are currently in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = 'yes'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor who has advised a student in more than one phase of the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.hasPosition='professor' AND person.inPhase IS NOT NULL AND person.yearsInProgram > '1' AND EXISTS (SELECT 1 FROM advisedBy, person WHERE advisedBy.p_id_dummy=person.p_id AND advisedBy.p_id = person.p_id AND person.inPhase IS NOT NULL AND person.yearsInProgram > '1' GROUP BY advisedBy.p_id_dummy HAVING COUNT(advisedBy.p_id_dummy) > 1) ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in the 200-level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor IS NOT NULL AND course.courseLevel LIKE '200%'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who teaches a course with a level 'Undergraduate'?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='Professor' AND course.courseLevel='Undergraduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the level of the course taught by the professor with the ID 1?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have taught at least 3 courses?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id GROUP BY course.course_id HAVING COUNT(taughtBy.course_id) >= 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND person.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the IDs of all courses that a professor who has been in the program for more than 1 year has taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, person p, taughtBy tb WHERE c.course_id = tb.course_id AND p.p_id = tb.p_id AND p.hasPosition = 'professor' AND p.yearsInProgram > '1'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught both 'Java Programming' and 'Data Structures'?",
    "evidence": "",
    "SQL": "SELECT distinct p_id FROM taughtBy tb, course c WHERE tb.course_id = c.course_id AND c.courseLevel IN ('Java Programming', 'Data Structures')"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with at least 2 years of teaching experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= '2' AND c.course_id NOT IN (SELECT course_id FROM taughtBy WHERE p_id NOT IN (SELECT p_id FROM person WHERE yearsInProgram < '2'))"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students with years in program greater than 3?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase IS NULL AND p.yearsInProgram > 3"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is the professor with ID 1 currently teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM taughtBy, course WHERE taughtBy.p_id = (SELECT p_id FROM person WHERE professor = 1) AND taughtBy.course_id = course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses of level 'Intermediate'?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE c.courseLevel = 'Intermediate'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who advises a student in the same course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON p.p_id = t.p_id JOIN advisedBy ab ON p.p_id = ab.p_id_dummy WHERE c.course_id IN (SELECT ab.p_id_dummy FROM advisedBy ab)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has a position and is in the first phase?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'TRUE' AND p.inPhase = 'First Phase'"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has taught at least one course for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5 ORDER BY course.courseLevel, course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor who has taught at least 3 courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN (SELECT p_id, COUNT(*) as numCourses FROM taughtBy GROUP BY p_id HAVING COUNT(*) >= 3) t2 ON t.p_id = t2.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram = '5 years' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have professors with at least 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram >= 5"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses that a professor who has taught a course in the past has taught?",
    "evidence": "",
    "SQL": "SELECT distinct c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition='professor' AND p.inPhase='past'"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses that are taught by professors who have advised at least one student?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, advisedBy a WHERE t.p_id = a.p_id AND a.p_id_dummy IS NOT NULL GROUP BY c.course_id, c.courseLevel HAVING COUNT(DISTINCT a.p_id_dummy) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What are the course IDs of the courses taught by the professor with the professor_id = 2?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 2)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by a professor who has also been advised by another professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id JOIN advisedBy ab ON p.p_id = ab.p_id_dummy WHERE p.hasPosition = 'professor' AND ab.p_id IS NOT NULL GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Smith teaching?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.professor = 'Smith'"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach a course at the graduate level?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p_id FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'Graduate'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors in level 'Introductory'?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel, t.course_id FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id INNER JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1 AND c.courseLevel = 'Introductory'"
  },
  {
    "db_id": "computer_student",
    "question": "Who teaches the course with courseLevel 'Basic'?",
    "evidence": "",
    "SQL": "SELECT person.p_id, person.professor AS Professor FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'Basic'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does a professor with the ID of 1 teach?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = (SELECT p_id FROM person WHERE p_id = 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the professors in the 'Advanced' course level who also teach a course in the 'Phase 2'?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Advanced' AND p.inPhase = 'Phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor who advises a student who is in their second phase of the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy AS t JOIN person AS p ON t.p_id = p.p_id JOIN course AS c ON t.course_id = c.course_id WHERE p.hasPosition = 'adviser' AND p.inPhase = 'Phase 2'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor that has more than 10 years of experience?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy t JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND yearsInProgram > 10"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor named 'John' teaching?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND person.inPhase = 'Professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors who have taught a course in a higher level than the one they themselves took in the past?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id FROM course c, taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.hasPosition = 'Professor' AND c.courseLevel > (SELECT MAX(courseLevel) FROM course WHERE course_id IN (SELECT tb.course_id FROM taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.hasPosition = 'Professor'))"
  },
  {
    "db_id": "computer_student",
    "question": "What is the name of the professor who teaches the course with ID 1?",
    "evidence": "",
    "SQL": "SELECT person.professor as Name FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE course.course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who is in their last year of the program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.inPhase = 'last year'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the ID of the course taught by a professor who has been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy, person WHERE taughtBy.p_id = person.p_id AND yearsInProgram > '5' AND hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What professors have taught the highest level of courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.professor FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = (SELECT MAX(courseLevel) FROM course)"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by Professor with the most years in the program?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM taughtBy JOIN course ON taughtBy.course_id = course.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE yearsInProgram = (SELECT MAX(yearsInProgram) FROM person) ORDER BY courseLevel LIMIT 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is Professor Yadvinder taught?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Professor' AND professor = 'Yadvinder') AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by a professor who has been in the program for at least 2 years?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.yearsInProgram >= 2 AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professor teaches the course with the highest level?",
    "evidence": "",
    "SQL": "SELECT p_professor.professor FROM course, taughtBy, person AS p_professor WHERE course.courseLevel = (SELECT MAX(courseLevel) FROM course) AND taughtBy.course_id = course.course_id AND taughtBy.p_id = p_professor.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has advised a student?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.p_id IN (SELECT p_id FROM person WHERE hasPosition = 'professor' AND p_id IN (SELECT p_id_dummy FROM advisedBy)) ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors teach courses at the beginner level?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id WHERE course.courseLevel = 'beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a person of a certain level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, taughtBy.p_id, person.hasPosition FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND course.courseLevel = 'some specific level'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level for courses taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT AVG(course.courseLevel) FROM course, person, taughtBy WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor who advised the student with p_id 5?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.student = 5 AND person.p_id IN (SELECT p_id_dummy FROM advisedBy WHERE p_id = 5)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors of courseLevel 'beginner'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition='Professor' AND c.courseLevel='beginner'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the courses taught by a professor who has a student?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'student' AND person.professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by the professor with p_id = 1?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND taughtBy.course_id = course.course_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by professors who have taught at least two courses?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy WHERE course.course_id = taughtBy.course_id GROUP BY course.course_id, course.courseLevel HAVING COUNT(taughtBy.p_id) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does professor Bob teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE taughtBy.p_id = person.p_id AND person.professor = 'Bob'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses were taught by a professor who has taught more than one course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor IS NOT NULL AND (SELECT COUNT(*) FROM taughtBy WHERE p.p_id = taughtBy.p_id) > 1 GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What is the name of the professor who taught the 'Introduction to Data Science' course?",
    "evidence": "",
    "SQL": "SELECT DISTINCT person.p_id, person.professor FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND course.courseLevel = 'Introduction to Data Science'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND LENGTH(p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors with more than 2 years in program?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.yearsInProgram > 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors have taught at least two different courses?",
    "evidence": "",
    "SQL": "SELECT p_id FROM (SELECT p_id, course_id, COUNT(course_id) as count FROM taughtBy GROUP BY p_id, course_id HAVING COUNT(course_id) > 1) AS temp"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with the course level 'Graduate'?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1 AND c.courseLevel = 'Graduate'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses has John, a student, been taught by?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy t, person p WHERE p.student = 1 AND p.p_id = t.p_id AND t.course_id = c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a professor who has been a professor for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.yearsInProgram > '5'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by the professor with the most years in the program?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram = (SELECT MAX(yearsInProgram) FROM person) ORDER BY course.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of all courses that are taught by professors who have at least one student in their advising relationship?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person p ON taughtBy.p_id = p.p_id WHERE p.hasPosition = 'professor' AND EXISTS (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = p.p_id) GROUP BY course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the professors who teach at least two courses?",
    "evidence": "",
    "SQL": "SELECT DISTINCT p.* FROM person p JOIN taughtBy t ON p.p_id = t.p_id GROUP BY p.p_id HAVING COUNT(t.course_id) >= 2"
  },
  {
    "db_id": "computer_student",
    "question": "Which students in the program have a professor who is currently teaching at least one course?",
    "evidence": "",
    "SQL": "SELECT p.student FROM person p, taughtBy tb WHERE p.p_id = tb.p_id AND (SELECT COUNT(*) FROM taughtBy WHERE p.p_id = tb.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What are all the courses taught by a professor?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.professor IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by the professor with professor id 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN course c ON tb.course_id = c.course_id WHERE tb.p_id IN (SELECT p_id FROM person WHERE professor = 2)"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has advised a student for at least 2 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition='professor' AND EXISTS (SELECT * FROM advisedBy WHERE advisedBy.p_id_dummy=person.p_id AND advisedBy.p_id=person.p_id AND YEARSINPROGRAM='2+')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by Professor X?",
    "evidence": "",
    "SQL": "SELECT course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'X'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses were taught by professors with 5 or more years in the program?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND LENGTH(person.yearsInProgram) >= 4 GROUP BY course.course_id, course.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors who have been in a program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.yearsInProgram > '5' GROUP BY c.course_id, c.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "Which professors are currently teaching courses at the advanced level?",
    "evidence": "",
    "SQL": "SELECT p.professor FROM person p, taughtBy tb, course c WHERE p.p_id = tb.p_id AND tb.course_id = c.course_id AND c.courseLevel = 'advanced'"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses have been taught by a professor in phase 3 of the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.inPhase = 'phase 3' AND strftime('%Y', 'now') - strftime('%Y', p.yearsInProgram) > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who teaches a course with a 'Intermediate' level and has advised a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Intermediate' AND EXISTS (SELECT 1 FROM advisedBy ab WHERE ab.p_id = p.p_id AND p.hasPosition = 'Student')"
  },
  {
    "db_id": "computer_student",
    "question": "What is the number of courses taught by professors who have more than 3 years of experience in a particular program?",
    "evidence": "",
    "SQL": "SELECT COUNT(*) FROM taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.yearsInProgram > '3' GROUP BY tb.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has more than one advisee?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND person.p_id IN (SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id_dummy) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have advised students in the past?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM advisedBy)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught a course with a course level of 'B'? ",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND c.courseLevel = 'B'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does the professor with ID 1 teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE person.p_id = taughtBy.p_id AND taughtBy.course_id = course.course_id AND person.p_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with a department of computer science?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy tb ON c.course_id = tb.course_id JOIN person p ON tb.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND p.yearsInProgram LIKE '%Computer Science%'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught which course?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel, person.professor as 'Teaches', person.student as 'Taught' FROM course LEFT JOIN taughtBy ON course.course_id = taughtBy.course_id LEFT JOIN person ON taughtBy.p_id = person.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have taught courses at course level 2?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.professor = 1 AND c.courseLevel = 2"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who advise students in phase 2?",
    "evidence": "",
    "SQL": "SELECT course_id FROM taughtBy JOIN person ON taughtBy.p_id = person.p_id JOIN advisedBy ON person.p_id = advisedBy.p_id_dummy WHERE person.inPhase = 'phase 2' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course with the course level 'Introductory'? ",
    "evidence": "",
    "SQL": "SELECT p.p_id, p.professor as professor FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE c.courseLevel = 'Introductory'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has a professor taught who has advised more than 5 students?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course, taughtBy, person WHERE course.course_id = taughtBy.course_id AND taughtBy.p_id = person.p_id AND person.p_id IN (SELECT advisedBy.p_id_dummy FROM advisedBy GROUP BY advisedBy.p_id_dummy HAVING COUNT(*) > 5)"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by a person who has a position that includes 'Professor'? ",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition LIKE '%Professor%'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 3 years?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM course C JOIN taughtBy T ON C.course_id = T.course_id JOIN person P ON T.p_id = P.p_id WHERE P.yearsInProgram > '3' GROUP BY C.course_id, C.courseLevel"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have been in the program for more than 5 years?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5' AND person.hasPosition = 'professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor who has taught more than one course?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'professor' AND p.p_id IN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(DISTINCT course_id) > 1)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by Professors in the 'advanced' level?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c, taughtBy t, person p WHERE c.courseLevel = 'advanced' AND t.p_id = p.p_id"
  },
  {
    "db_id": "computer_student",
    "question": "Which courses are taught by professors with a position of 'Software Engineering'?",
    "evidence": "",
    "SQL": "SELECT course.course_id FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Software Engineering'"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by a professor with at least 5 years of experience?",
    "evidence": "",
    "SQL": "SELECT c.course_id, c.courseLevel FROM course c, taughtBy tb, person p WHERE tb.p_id = p.p_id AND p.yearsInProgram >= '5' AND c.course_id = tb.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses is a professor who has been a professor for more than 5 years and has advised at least one student teaching?",
    "evidence": "",
    "SQL": "SELECT DISTINCT course.course_id, course.courseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE (person.yearsInProgram > '5' AND person.hasPosition = 'professor') AND EXISTS (SELECT 1 FROM advisedBy WHERE advisedBy.p_id = person.p_id)"
  },
  {
    "db_id": "computer_student",
    "question": "Which students are taught by professors with more than 5 years of experience in the program?",
    "evidence": "",
    "SQL": "SELECT p.student FROM person p JOIN taughtBy tb ON p.p_id = tb.p_id JOIN course c ON tb.course_id = c.course_id WHERE c.courseLevel = 'undergraduate' AND p.yearsInProgram > 5"
  },
  {
    "db_id": "computer_student",
    "question": "What is the course level of the course taught by Professor X?",
    "evidence": "",
    "SQL": "SELECT courseLevel FROM course, taughtBy WHERE taughtBy.p_id IN (SELECT p_id FROM person WHERE professor = (SELECT p_id FROM person WHERE p_id = 'X')) AND course.course_id = taughtBy.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who are in phase 1 of their program?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy t JOIN course c ON t.course_id = c.course_id JOIN person p ON t.p_id = p.p_id WHERE p.inPhase = '1' GROUP BY c.course_id"
  },
  {
    "db_id": "computer_student",
    "question": "What courses does Professor Smith teach?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM taughtBy INNER JOIN course ON taughtBy.course_id = course.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 'Smith' AND person.p_id IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What courses are taught by professors who have also advised at least one student?",
    "evidence": "",
    "SQL": "SELECT C.course_id, C.courseLevel FROM course C, taughtBy T, person P WHERE C.course_id = T.course_id AND P.p_id = T.p_id AND P.hasPosition = 'professor' AND (SELECT COUNT(*) FROM advisedBy A WHERE A.p_id = P.p_id) > 0"
  },
  {
    "db_id": "computer_student",
    "question": "What is the average course level taught by a professor with a position of 'Full-Time' in phase 1 of the program?",
    "evidence": "",
    "SQL": "SELECT AVG(courseLevel) as averageCourseLevel FROM course JOIN taughtBy ON course.course_id = taughtBy.course_id JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Full-Time' AND person.inPhase = '1'"
  },
  {
    "db_id": "computer_student",
    "question": "What course is taught by a professor who has also advised a student?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id JOIN advisedBy ab ON p.p_id = ab.p_id WHERE p.hasPosition = 'professor' AND ab.p_id_dummy IS NOT NULL"
  },
  {
    "db_id": "computer_student",
    "question": "What course is currently being taught by a professor who has been in the program for more than 2 years?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM taughtBy tb JOIN person p ON tb.p_id = p.p_id JOIN course c ON tb.course_id = c.course_id WHERE p.yearsInProgram > '2' AND p.hasPosition='professor'"
  },
  {
    "db_id": "computer_student",
    "question": "What is the list of courses taught by a professor with a certain level?",
    "evidence": "",
    "SQL": "SELECT course.course_id, course.courseLevel FROM course INNER JOIN taughtBy ON course.course_id = taughtBy.course_id INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.hasPosition = 'Professor' AND course.courseLevel = 'Bachelor'"
  },
  {
    "db_id": "computer_student",
    "question": "Who taught the course with ID 1?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy WHERE course_id = 1"
  },
  {
    "db_id": "computer_student",
    "question": "What are the courses taught by a professor who has taught at least one course in both undergraduate and graduate levels?",
    "evidence": "",
    "SQL": "SELECT DISTINCT c.course_id, c.courseLevel FROM course c JOIN taughtBy t ON c.course_id = t.course_id JOIN person p ON t.p_id = p.p_id WHERE p.hasPosition = 'Professor' AND EXISTS (SELECT 1 FROM course WHERE courseLevel = 'Undergraduate' AND (SELECT COUNT(*) FROM taughtBy WHERE course_id = course.course_id AND p_id = p.p_id) > 0) AND EXISTS (SELECT 1 FROM course WHERE courseLevel = 'Graduate' AND (SELECT COUNT(*) FROM taughtBy WHERE course_id = course.course_id AND p_id = p.p_id) > 0)"
  },
  {
    "db_id": "computer_student",
    "question": "What courses has Professor John taught?",
    "evidence": "",
    "SQL": "SELECT c.course_id FROM course c INNER JOIN taughtBy t ON c.course_id = t.course_id WHERE t.p_id IN (SELECT p_id FROM person WHERE professor = 'John')"
  },
  {
    "db_id": "computer_student",
    "question": "What professors teach course with 'Advanced Programming' level?",
    "evidence": "",
    "SQL": "SELECT p_id FROM taughtBy, course WHERE taughtBy.course_id = course.course_id AND course.courseLevel = 'Advanced Programming' GROUP BY p_id"
  }
]