[
  {
    "question": "How many students are currently in Phase I of the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1 AND inPhase = 'Phase I'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) AS studentCount FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy AS professor_id FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professors who have a position as a Teaching Assistant in the program?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN person AS T3 ON T1.p_id_dummy = T3.p_id WHERE T2.hasPosition = 'Professor' AND T3.hasPosition = 'Teaching Assistant'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of courses per professor?",
    "SQL": "SELECT CAST(COUNT(course_id) AS REAL) / COUNT(DISTINCT p_id) AS avgnum FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors?",
    "SQL": "SELECT course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course levels that have been offered?",
    "SQL": "SELECT DISTINCT courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT T1.professor, COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the professors who have advised at least one student.",
    "SQL": "SELECT DISTINCT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have been taught by more than 3 professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest course level in the course table?",
    "SQL": "SELECT MAX(courseLevel) AS highestLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the Level_500?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Show all the course IDs for courses at the undergraduate level.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_300'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 42?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 42",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 1?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses taught by person with ID 3?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs for courses taught by professors with a position of 'AsstProf'?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of courses taught by professor X.",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are taught by professors with a position in Phase I?",
    "SQL": "SELECT course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Phase I'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each advisor?",
    "SQL": "SELECT COUNT(p_id) AS student_count, p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each person?",
    "SQL": "SELECT COUNT(p_id) , p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person IDs are associated with students?",
    "SQL": "SELECT p_id FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 5?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT T2.professor, COUNT(T1.course_id) as totalCourses FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses taught by professors who have a position of 'Tenured'?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.hasPosition = 'Tenured'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by a professor with a position as 'Professor'?",
    "SQL": "SELECT SUM(CASE WHEN T1.professor = 1 THEN 1 ELSE 0 END) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses offered at each level?",
    "SQL": "SELECT courseLevel, COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are associated with each advisor?",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses that are not professional or master/graduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel != 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses that are Level 500 courses?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 32?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 32",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of courses at the professional level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Professional'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are the advisors for student ID 12?",
    "SQL": "SELECT T2.p_id_dummy FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for at least 5 years?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE yearsInProgram = '5+ years')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by person with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course levels of courses taught by a specific professor with ID 42?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 42",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "list all the courses that a given student is advised by",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN advisedBy AS T2 ON T1.course_id = T2.p_id WHERE T2.p_id_dummy = (SELECT p_id FROM person WHERE student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 101?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professor with ID 5?",
    "SQL": "SELECT T2.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students who are advised by a professor with the position 'Full Professor'.",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN person AS T3 ON T1.p_id_dummy = T3.p_id WHERE T2.hasPosition = 'Full Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 5?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT T1.p_id, COUNT(DISTINCT T2.p_id) FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at each level?",
    "SQL": "SELECT courseLevel, COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) , p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 101?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors teach the most courses?",
    "SQL": "SELECT T2.professor, COUNT(*) AS num_courses FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T2.professor ORDER BY num_courses DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor with ID 10?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students for each professor?",
    "SQL": "SELECT COUNT(student), p_id FROM person WHERE student = 1 GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.professor = 1 GROUP BY T1.p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years a student is in the program?",
    "SQL": "SELECT CAST(SUM(yearsInProgram) AS REAL) / COUNT(p_id) AS avgYears FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "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 IS NULL AND p.yearsInProgram > '5 years'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course levels have the most professors assigned to them?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T1.courseLevel ORDER BY COUNT(DISTINCT T2.p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are currently involved in both research and teaching?",
    "SQL": "SELECT professor FROM person WHERE professor = 1 AND student = 0",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the total number of students in the database.",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than one professor teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 5?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Yes')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with the title 'Professor'?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the database?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by the professor with ID 5?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the IDs of courses taught by professors with years in program greater than 10?",
    "SQL": "SELECT T1.course_id FROM course AS T1 JOIN taughtBy AS T2 ON T1.course_id = T2.course_id JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with the position 'Professor'?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the people who are both advisors and students.",
    "SQL": "SELECT p_id FROM advisedBy INTERSECT SELECT p_id FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there in the database?",
    "SQL": "SELECT COUNT(course_id) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and the corresponding course levels for all professional courses?",
    "SQL": "SELECT course_id, courseLevel FROM course WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors with a position of 'AsstProf'?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course(s) are taught by Professor John Doe?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.hasPosition = 'Professor' AND T3.student = 0",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at each course level?",
    "SQL": "SELECT courseLevel, COUNT(*) AS numberOfCourses FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS numCourses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest course level?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 5?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than 3 professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students for each advisor?",
    "SQL": "SELECT COUNT(p_id) AS number_of_students, COUNT(DISTINCT p_id_dummy) AS number_of_advisors FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each person?",
    "SQL": "SELECT p_id, COUNT(course_id) AS numCourses FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs that are taught by professors.",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Write a query to list all courses taught by a professor with a position of 'Assistant Professor' or higher.",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T2 INNER JOIN course AS T1 ON T2.course_id = T1.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition IN ('Professor', 'Associate Professor', 'Full Professor')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a professor with more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names of all professors in the person table.",
    "SQL": "SELECT professor FROM person WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have course level 'Level_500'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the master/graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) AS num_students , T2.p_id AS advisor_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.student = 1 GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students advised by each professor?",
    "SQL": "SELECT T2.professor, COUNT(DISTINCT T1.p_id) as num_students FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course level has the most courses?",
    "SQL": "SELECT courseLevel FROM course GROUP BY courseLevel ORDER BY COUNT(*) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 1?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many people are in the `person` table?",
    "SQL": "SELECT COUNT(*) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 101?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course(s) are taught by professor with ID 1?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(*) AS total_courses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years in the program for all students?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have been taught by more than two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 2?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 12?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students who are both advised by another person and have more than 5 years in the program.",
    "SQL": "SELECT COUNT(*) FROM person WHERE p_id IN ( SELECT p_id FROM advisedBy ) AND student = 1 AND yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'Level_100'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_100'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of distinct courses taught by each professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) AS numCourses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each advisor?",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy AS advisor_id FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names of all professors who are teaching course ID 12.",
    "SQL": "SELECT T1.professor FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T2.course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by both professor 1 and professor 2?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id IN (1, 2) GROUP BY T1.course_id HAVING COUNT(DISTINCT T2.p_id) = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position?",
    "SQL": "SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are there in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 123?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at each course level?",
    "SQL": "SELECT courseLevel, COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a specific position?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'professorPosition'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by Professor X?",
    "SQL": "SELECT DISTINCT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course level are the most popular among students?",
    "SQL": "SELECT T2.courseLevel FROM advisedBy AS T1 INNER JOIN course AS T2 ON T1.p_id = T2.course_id GROUP BY T2.courseLevel ORDER BY COUNT(T1.p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'Level_400'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "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",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors in the person table?",
    "SQL": "SELECT COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there in the database?",
    "SQL": "SELECT COUNT(*) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the number of courses taught by each professor.",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with yearsInProgram less than or equal to 5?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram <= 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position of 'Active'?",
    "SQL": "SELECT DISTINCT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Active' AND T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the level of the course with course ID 18?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs and their corresponding course levels.",
    "SQL": "SELECT course_id, courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the names of people who are both professors and students.",
    "SQL": "SELECT p_id FROM person WHERE professor = 1 AND student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are taught by professors with the position 'professor'?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "list all the course IDs for professional or master/graduate courses",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by person ID 34?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 34",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by a person who has a position as a professor?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs that have more than one professor teaching them.",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are currently being taught?",
    "SQL": "SELECT COUNT(*) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in Phase I?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase I'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program for more than 5 years?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at each level?",
    "SQL": "SELECT courseLevel , COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a person with an ID of 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course ID of the course that is taught by professor with ID 10?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professors with 10 or more years of experience in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = '10+'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with years in program less than 5 years?",
    "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",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 101?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all the courses taught by professor with ID 10?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have been advised by professors?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'Level_500'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 101?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(p_id) FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person with the most courses taught?",
    "SQL": "SELECT T1.p_id FROM person AS T1 JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id ORDER BY COUNT(*) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs for the courses that are taught by person 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "what courses are advised by professor 12?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN advisedBy AS T3 ON T2.p_id = T3.p_id WHERE T3.p_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by a professor with a position in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.professor = 1 AND T3.hasPosition = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names of all professors who have been in the program for more than 10 years.",
    "SQL": "SELECT hasPosition FROM person WHERE student = 0 AND yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professor with ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered at the advanced level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by more than two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 1?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are teaching the course with course ID 20?",
    "SQL": "SELECT p_id FROM taughtBy WHERE course_id = 20",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than 2 students in the course?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Undergrad' GROUP BY T1.course_id HAVING COUNT(T2.p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM person AS p JOIN taughtBy AS t ON p.p_id = t.p_id WHERE p.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are taught by professors who have been in the program for more than 10 years?",
    "SQL": "SELECT course_id FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of people in the database?",
    "SQL": "SELECT COUNT(*) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are the professors advising students?",
    "SQL": "SELECT T1.p_id, T1.p_id_dummy FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 AND T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Retrieve the number of professors currently in the program.",
    "SQL": "SELECT COUNT(*) FROM person WHERE professor = 1 AND inPhase = 'In-Program'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with ID 10?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by Professor with ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have been taught by at least two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in phase 1?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase1'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the names of all people who have been advised by at least one other person.",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id_dummy) >= 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students who are advised by a professor who teaches course 18?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN taughtBy AS T3 ON T2.p_id = T3.p_id WHERE T3.course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each person?",
    "SQL": "SELECT T2.p_id, COUNT(*) AS numCourses FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at level 'Graduate'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in phase 1 of the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase 1'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are being taught by a person with professor position?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses that have been taught by more than one professor?",
    "SQL": "SELECT COUNT(*) FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of courses that are taught by a person with a position in the program?",
    "SQL": "SELECT course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students and professors in the database?",
    "SQL": "SELECT SUM(student), SUM(professor) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Insert a new course with the ID 101 and course level 'Level_400'",
    "SQL": "INSERT INTO course (course_id, courseLevel) VALUES (101, 'Level_400')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a person with yearsInProgram greater than 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have a course level of 'Graduate'?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the master or graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel LIKE 'Level_500%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students who are not advised by anyone.",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND p_id NOT IN (SELECT p_id_dummy FROM advisedBy)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by at least two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 500 or higher?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel LIKE 'Level_500%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professor with p_id 123?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of people in the database?",
    "SQL": "SELECT COUNT(*) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names and IDs of all students.",
    "SQL": "SELECT p_id, hasPosition FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy AS advisor FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who is advising two students?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id GROUP BY T2.p_id HAVING COUNT(*) = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years a student has been in the program?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with ID 5?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students enrolled in each course?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by Professor Smith?",
    "SQL": "SELECT T1.student FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average years of a person in the program who has a position and is in a specific phase?",
    "SQL": "SELECT CAST(SUM(yearsInProgram) AS REAL) / COUNT(p_id) FROM person WHERE hasPosition = 1 AND inPhase = 'phase_3'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course ID of the course that is taught by person ID 2?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) AS number_of_students, p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram = '5+'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students in each phase of the program?",
    "SQL": "SELECT inPhase, COUNT(*) FROM person WHERE student = 1 GROUP BY inPhase",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 10 years of experience?",
    "SQL": "SELECT COUNT(DISTINCT T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs taught by professors with 'Position_A' in the person table?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Position_A'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the total number of students in the database.",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered at the master's level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_600'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professors with tenure?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'tenured'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the person IDs of students who are in phase 'Phase_1' or 'Phase_2'.",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND inPhase IN ('Phase_1', 'Phase_2')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'enrolled'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Professor' AND yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the level of the course with course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are taught by professors who have been in the program for more than 5 years?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > '5'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by the professor with ID 2?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy = (SELECT p_id FROM person WHERE p_id = 2)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 500?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position in the faculty?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.hasPosition = 'in Faculty'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered by professors in the 'graduate' phase of the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.inPhase = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with positions?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition IS NOT NULL AND professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all people who are both students and professors?",
    "SQL": "SELECT T1.student, T1.professor FROM person AS T1 WHERE T1.student = 1 AND T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the advanced level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses at the professional level.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position in 'Professor'?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses have more than two professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by each person?",
    "SQL": "SELECT p_id, COUNT(course_id) AS num_courses FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professor with ID 101?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in Phase 4?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase_4'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the professor IDs who have advised at least one student.",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by more than one professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(DISTINCT course_id) > 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and course levels of courses taught by professors?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with years in program greater than 5?",
    "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",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 2?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses each professor is teaching?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course that has the most students advised by a professor?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN advisedBy AS T2 ON T2.p_id = T2.p_id_dummy GROUP BY T2.p_id_dummy ORDER BY COUNT(T2.p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the maximum years in program for a person?",
    "SQL": "SELECT MAX(yearsInProgram) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and their corresponding levels for courses that are either Level 200 or Level 500?",
    "SQL": "SELECT course_id, courseLevel FROM course WHERE courseLevel IN ('Level_200', 'Level_500')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course taught by professor with ID 10?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 5 years of experience in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS P1 INNER JOIN taughtBy AS T1 ON P1.p_id = T1.p_id INNER JOIN course AS C1 ON T1.course_id = C1.course_id WHERE P1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have a position in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'yes'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which student IDs have no advisor?",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND p_id NOT IN (SELECT p_id FROM advisedBy)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 21?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 21",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for professional courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'professional'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a courseLevel of 'graduate'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor ID 23?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 23",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all course IDs that are taught by at least two professors.",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest level course in the database?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of all courses taught by professor with ID 10?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 4?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 4",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 12?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT T2.p_id, COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course has the highest number of students assigned to it?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN advisedBy AS T2 ON T2.p_id = T1.course_id GROUP BY T1.course_id ORDER BY COUNT(T2.p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average years of students in the program for all the students who have a professor advising them?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE p_id IN (SELECT p_id_dummy FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student = 1))",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a specific professor?",
    "SQL": "SELECT COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with a position of 'professor'?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course ID and professor for each course taught by a professor?",
    "SQL": "SELECT T1.course_id, T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by Professor X?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a professor with a 'Full-Time' position?",
    "SQL": "SELECT COUNT(*) FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Full-Time')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are taught by professors?",
    "SQL": "SELECT course_id FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the professor IDs who have advised a student.",
    "SQL": "SELECT DISTINCT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the names of people who have been advised by at least two advisors.",
    "SQL": "SELECT T2.professor FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.professor HAVING COUNT(T1.p_id_dummy) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.hasPosition = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the different course levels available in the course table?",
    "SQL": "SELECT DISTINCT courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) / COUNT(DISTINCT p_id_dummy) AS avgstudents FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with positions 'professor'?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for advanced or professional courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_400' OR courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have been advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id_dummy IN ( SELECT p_id FROM person WHERE professor = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the student IDs of students who are advised by professor ID 5.",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses taught by a person with the position 'Professor'?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course that is taught by professor with ID 5?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses at level 'beginner'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'beginner'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by person ID 12?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have advised by a professor?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of courses taught by a specific professor.",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students have been advised by a professor?",
    "SQL": "SELECT DISTINCT p_id FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses at the undergraduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy AS professor FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of students for each advisor?",
    "SQL": "SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with the ID 10?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are currently taught?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are all the students advised by a person with a position as professor?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the course with course ID 18?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by a professor with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'Advanced' level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position in the program?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.hasPosition = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students in the program who have a position?",
    "SQL": "SELECT COUNT(p_id) AS numOfStudents FROM person WHERE student = 1 AND hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor is teaching the most number of courses?",
    "SQL": "SELECT p_id, COUNT(course_id) AS numCourses FROM taughtBy GROUP BY p_id ORDER BY numCourses DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by each professor?",
    "SQL": "SELECT T1.hasPosition, COUNT(T2.course_id) as numCourses FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 GROUP BY T1.hasPosition",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course with course ID 3?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors who have both a student and a professor role in the program?",
    "SQL": "SELECT COUNT(T2.course_id) AS num FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 50?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 50",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who has the position of 'professor'?",
    "SQL": "SELECT T1.p_id FROM person AS T1 WHERE T1.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have a courseLevel of 'advanced'?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 12?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(*) FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are being advised by Prof. Smith?",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id_dummy WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who are in the second phase of the program?",
    "SQL": "SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.inPhase = 'Phase_2'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses with courseLevel 'Graduate'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest course level found in the database?",
    "SQL": "SELECT max(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND hasPosition = 'CURRENT'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by professor with ID 102.",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id = 102",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses offered by the university?",
    "SQL": "SELECT COUNT(course_id) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of courses each professor is teaching.",
    "SQL": "SELECT T2.p_id, COUNT(T1.course_id) AS numCourses FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professors who have positions?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course has the highest number of professors teaching it?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1) GROUP BY course_id ORDER BY COUNT(DISTINCT p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses with a course level of 'Level_400'?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are enrolled in courses level 400?",
    "SQL": "SELECT COUNT(DISTINCT student) FROM course AS T1 INNER JOIN person AS T2 ON T1.course_id = T2.p_id WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the names of all advisors who have advised at least one student.",
    "SQL": "SELECT T1.p_id, T2.p_id_dummy FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and corresponding course levels for courses that are either professional or master/graduate courses?",
    "SQL": "SELECT course_id, courseLevel FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with the ID greater than 100?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id > 100",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a professor who has been in the program for more than 10 years?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS p JOIN taughtBy AS t ON p.p_id = t.p_id WHERE p.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor has the highest number of students advised by them?",
    "SQL": "SELECT T1.hasPosition FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.hasPosition ORDER BY COUNT(T2.p_id_dummy) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the master's level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_600'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professor with ID 50?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 50",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are there in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are supervised by each advisor?",
    "SQL": "SELECT p_id_dummy, COUNT(p_id) AS num_students FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Write a SQL query to find the number of students in the 'CS' department.",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND hasPosition LIKE '%CS%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there for each course level?",
    "SQL": "SELECT COUNT(course_id) , courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who has a position as a 'professor'?",
    "SQL": "SELECT T1.p_id FROM person AS T1 WHERE T1.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the total number of students in the database.",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in each course?",
    "SQL": "SELECT COUNT(T1.p_id) AS total_students, T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T2.course_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for over 5 years?",
    "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",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a person who has a position as a professor?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for Level_500 courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by at least one professor?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students who have an advisedBy relationship with a professor.",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are the students advised by professor ID 1?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a professor who has been in the program for more than 5 years?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1 AND person.yearsInProgram > '5 years'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position as a principal investigator?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Principal investigator' AND T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by Professor Smith?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by more than two professors?",
    "SQL": "SELECT COUNT(*) FROM ( SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professors with more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professor with ID 2?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the names of students who have advised by at least two other students.",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy IN ( SELECT p_id FROM advisedBy GROUP BY p_id_dummy HAVING COUNT(p_id) >= 2 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of people advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of students for each advisor?",
    "SQL": "SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(*) AS student_count FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 12?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(*) AS numStudentsAdvised, T2.professor FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for professional or master/graduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are associated with professors who have a position of 'professor'?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for the course with ID 5?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average course level of all courses?",
    "SQL": "SELECT AVG(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many distinct students are advised by each professor?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) , T2.professor FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by person with ID 5?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor with p_id 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position of 'Professor'?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.hasPosition = 'Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1 AND inPhase = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each advisor?",
    "SQL": "SELECT p_id_dummy, COUNT(p_id) AS student_count FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students and professors combined?",
    "SQL": "SELECT COUNT(student) + COUNT(professor) AS total FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor with ID 3?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by a specific person, identified by p_id 1?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have both undergraduate and graduate levels?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel LIKE '%Undergraduate%' AND courseLevel LIKE '%Master%' OR courseLevel LIKE '%graduate%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest level of course in the course table?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for professional or master/graduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course ID and course level for the course with the highest level?",
    "SQL": "SELECT course_id, courseLevel FROM course ORDER BY courseLevel DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the course with course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'true'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT p_id, COUNT(p_id_dummy) FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the unique course IDs that are taught by professors.",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the courses taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT c.course_id FROM course AS c JOIN taughtBy AS tb ON c.course_id = tb.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors with the position 'Full Professor'?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Full Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a yearsInProgram greater than 5?",
    "SQL": "SELECT DISTINCT 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.yearsInProgram > 5 AND p.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students who have more than one advisor?",
    "SQL": "SELECT COUNT(p_id) FROM advisedBy GROUP BY p_id_dummy HAVING COUNT(p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the names of people who are both students and professors in the system.",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by both professors and students?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id IN (SELECT p_id FROM person WHERE professor = 1 AND student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are also advised by other professors?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by at least one advisor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of courses per professor?",
    "SQL": "SELECT CAST(COUNT(DISTINCT course_id) AS REAL) / COUNT(DISTINCT p_id) AS avgnum FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses that are taught by a professor with a position?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors are in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all the people who are both a professor and a student?",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professor with ID 3?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "what is the total number of students",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 12?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a specific professor identified by p_id?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students each professor advises?",
    "SQL": "SELECT COUNT(p_id) , p_id FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are the professors and students in the program for at least one year?",
    "SQL": "SELECT p_id, student , professor FROM person WHERE inPhase = '1year' OR inPhase = 'PhD'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students who are also professors",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by both person 1 and person 2?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 1 INTERSECT SELECT course_id FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS totalCourses FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest course level in the database?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with the position 'Professor Adjunct'?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Professor Adjunct'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years of experience?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there in each level?",
    "SQL": "SELECT courseLevel, COUNT(course_id) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses that have at least one student advising.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN advisedBy AS T2 ON T1.course_id = T2.p_id WHERE T2.p_id IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who is both a professor and a student?",
    "SQL": "SELECT T.p_id FROM person AS T WHERE T.professor = 1 AND T.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professor ID 1?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position other than 'professor'?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 0 AND T2.professor = 1 AND T2.hasPosition != 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course is taught by person ID 22?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 22",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by person ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the course with course level 'PhD'?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'PhD'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the person IDs who have advised other person IDs.",
    "SQL": "SELECT p_id FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses taught by professors with more than 5 years in the program.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years in the program for students?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person has the position of 'Associate Professor' and has been in the program for more than 10 years?",
    "SQL": "SELECT p_id FROM person WHERE hasPosition = 'Associate Professor' AND yearsInProgram > '10'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT SUM(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses taught by professors.",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 21?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 21",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of either 'Level_100' or 'Level_200'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel IN ('Level_100', 'Level_200')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many distinct students are advised by each professor?",
    "SQL": "SELECT COUNT(DISTINCT T2.p_id_dummy) FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 3?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position in phase?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'yes' AND T2.inPhase = 'yes'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students enrolled in courses taught by professors who have more than 5 years of experience?",
    "SQL": "SELECT COUNT(DISTINCT student) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT DISTINCT course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > '5'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position of 'full'?",
    "SQL": "SELECT COUNT(DISTINCT T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'full'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by both professor A and professor B?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id = ( SELECT p_id FROM person WHERE professor = 'A' ) AND T1.p_id = ( SELECT p_id FROM person WHERE professor = 'B' )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses in each course level?",
    "SQL": "SELECT COUNT(*) AS total, courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(p_id_dummy), p_id FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have at least 5 years in the program?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.yearsInProgram >= 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and the number of professors teaching each course?",
    "SQL": "SELECT T1.course_id, COUNT(T2.p_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students in the program for each professor?",
    "SQL": "SELECT COUNT(student), p_id FROM person GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are all the people who have a position and are in phase?",
    "SQL": "SELECT p_id, hasPosition, inPhase FROM person WHERE hasPosition IS NOT NULL AND inPhase IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor has advised the most students?",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id ORDER BY COUNT(*) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of professors teaching course ID 18?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS totalCourses, p_id AS professorID FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each person?",
    "SQL": "SELECT COUNT(p_id_dummy) FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses that are taught by at least one professor.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'undergraduate' level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Select the number of unique students that are being advised by a professor.",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) AS num_unique_students FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors in the system?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id IN ( SELECT p_id FROM person WHERE professor = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS totalCourses, p_id AS professorID FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs that are taught by a professor with the position 'AsstProf'.",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors?",
    "SQL": "SELECT DISTINCT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the professor who is teaching course ID 18?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by a specific professor?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT T2.p_id , COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors are in the system?",
    "SQL": "SELECT COUNT(*) FROM person WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all students in the database?",
    "SQL": "SELECT p_id FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the phase 'program phase'?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'program phase'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the course IDs that are taught by both Professor A and Professor B.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN ( SELECT p_id FROM person WHERE professor = 'A' ) INTERSECT SELECT course_id FROM taughtBy WHERE p_id IN ( SELECT p_id FROM person WHERE professor = 'B' )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position in the program?",
    "SQL": "SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.professor = 1 AND T3.hasPosition = 'inPhase'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors in the person table?",
    "SQL": "SELECT COUNT(*) FROM person INNER JOIN taughtBy ON person.p_id = taughtBy.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with positions?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.professor = 1 AND T3.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at each level?",
    "SQL": "SELECT COUNT(course_id), courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor ID 5?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'Advanced' level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 10?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor teaches the course with the highest number of students?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = ( SELECT course_id FROM taughtBy GROUP BY course_id ORDER BY COUNT(*) DESC LIMIT 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 500?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 JOIN taughtBy AS T2 ON T1.course_id = T2.course_id JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor has taught the most courses?",
    "SQL": "SELECT T2.professor, COUNT(T1.course_id) AS num_courses FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.professor ORDER BY num_courses DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for the course with ID 25?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 25",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by professor with ID 10?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many different courses are being taught by professor with ID 5?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor with ID 1?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Number of student profiles with at least one advisedBy relationship.",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id IN ( SELECT p_id FROM person WHERE student = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of distinct courses taught by professors with 10 years in the program.",
    "SQL": "SELECT COUNT(DISTINCT T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS total_courses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many different courses are being taught by person ID 2?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at each level?",
    "SQL": "SELECT courseLevel, COUNT(course_id) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are all the students who have advised by a professor?",
    "SQL": "SELECT T1.p_id FROM person AS T1 JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 500 or higher?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel LIKE 'Level_%' AND courseLevel > 'Level_499'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have a student enrolled and which have no students enrolled?",
    "SQL": "SELECT course_id, CASE WHEN course_id IN (SELECT course_id FROM taughtBy) THEN 'Enrolled' ELSE 'Not Enrolled' END AS enrollmentStatus FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there with a course level of 'Level_300'?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_300'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all students who have advised by a professor.",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the professor who taught course ID 20?",
    "SQL": "SELECT T1.professor FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T2.course_id = 20",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the PhD level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'PhD'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) , T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students advised by each advisor.",
    "SQL": "SELECT COUNT(p_id) AS num_students, p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program for more than 5 years?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the course IDs and course levels of all courses that are taught by professors.",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than one professor teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for the course with course ID 35?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 35",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years of experience in the program?",
    "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",
    "evidence": ""
  },
  {
    "question": "How many courses are at each course level?",
    "SQL": "SELECT COUNT(course_id) , courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 123?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by professors with more than 10 years in the program.",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by person ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'Level_500' level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 3?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who has position as a professor?",
    "SQL": "SELECT p_id FROM person WHERE hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person IDs are both advised by and taught by someone?",
    "SQL": "SELECT p_id FROM advisedBy INTERSECT SELECT p_id FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at level 'Advanced'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the master's level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Master'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "how many students are in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.hasPosition = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 1?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and course levels for courses taught by professors?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the professors who are teaching a course with a courseLevel of 'Level_500'.",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T1.course_id WHERE T3.courseLevel = 'Level_500' AND T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person has been advised by more than 3 people?",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(DISTINCT p_id_dummy) > 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses with courseLevel 'Undergraduate'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT T2.professor, COUNT(T1.p_id) as student_count FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.professor = 1 GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of students for each advisor?",
    "SQL": "SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 100 or 200?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel IN ('Level_100', 'Level_200')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at each level?",
    "SQL": "SELECT courseLevel, COUNT(course_id) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a professor with years in program greater than 5?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs have been taught by more than two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT T2.p_id, COUNT(T1.course_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average course level of courses taught by professor ID 2?",
    "SQL": "SELECT AVG(T1.courseLevel) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors who have a position of 'AsstProf'?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are not advised by any other student?",
    "SQL": "SELECT student FROM person WHERE student = 1 AND p_id NOT IN ( SELECT p_id_dummy FROM advisedBy WHERE p_id_dummy = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by both Professor A and Professor B?",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.p_id = ( SELECT p_id FROM person WHERE hasPosition LIKE '%Professor A%' ) AND T2.p_id = ( SELECT p_id FROM person WHERE hasPosition LIKE '%Professor B%' )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have an advisor?",
    "SQL": "SELECT COUNT(p_id_dummy) AS student_count FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are supervised by each professor?",
    "SQL": "SELECT COUNT(student) FROM person WHERE hasPosition = 'professor' AND student IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person has been advised by more than 5 other students?",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id_dummy) > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 23?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 23",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course IDs are being taught by professors?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE hasPosition = 'professor' AND inPhase = 'inProgram'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students who are advised by at least two advisors.",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 WHERE T1.p_id IN (SELECT T1.p_id FROM advisedBy AS T1 GROUP BY T1.p_id HAVING COUNT(*) >= 2)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all courses taught by someone who has a position in the program.",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professors with positions in the program?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1 AND hasPosition = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have a position as a Research Assistant?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.hasPosition = 'Research Assistant' AND T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of all courses taught by professors who have been in the program for more than 5 years?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5 AND T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all course IDs that are taught by professors with more than 5 years in the program.",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'Graduate' level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students have advised by a person with more than 5 years in the program?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM person WHERE student = 1 AND yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for professional or master/graduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "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",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by both professor 1 and professor 2?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 1 INTERSECT SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are enrolled in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest level of course offered in the database?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each person?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many different courses are being taught by person ID 5?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students each person is advising",
    "SQL": "SELECT COUNT(*) , p_id FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who is advising Professor X?",
    "SQL": "SELECT T2.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T2.p_id = (SELECT p_id FROM person WHERE professor = 1 AND p_id = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professor with ID 10?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program for at least 2 years?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND yearsInProgram LIKE '%2 years%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are being taught by professor with ID 5?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses at level 'Master'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Master'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with p_id 101?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students enrolled in each course?",
    "SQL": "SELECT T1.course_id, COUNT(T2.p_id) AS student_count FROM course AS T1 INNER JOIN person AS T2 ON T2.student = 1 GROUP BY T1.course_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many distinct courses are being taught by person with ID 12?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 5?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many people are advised by Professor X?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor teaches the course with course_id 101?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses offered at each course level?",
    "SQL": "SELECT COUNT(course_id) , courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are teaching course ID 18?",
    "SQL": "SELECT DISTINCT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor has taught the most courses?",
    "SQL": "SELECT T2.p_id, COUNT(T2.course_id) AS num_courses FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id ORDER BY num_courses DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors are teaching course ID 18?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with years in program greater than 5?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who is advised by Professor A in the database?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of all courses taught by person with ID 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students who are advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are teaching professional or master/graduate level courses?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T3.courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T2.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by a person with the ID 123?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by more than two professors?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by person ID 37?",
    "SQL": "SELECT COUNT(*) FROM advisedBy WHERE p_id_dummy = 37",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for professional or master/graduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are in each course level?",
    "SQL": "SELECT COUNT(course_id), courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names of all persons who are both students and professors.",
    "SQL": "SELECT hasPosition FROM person WHERE student = 1 AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by Professor X?",
    "SQL": "SELECT T2.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 10 years?",
    "SQL": "SELECT DISTINCT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 10 AND T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND hasPosition = 'Yes' AND inPhase = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors are teaching course ID 18?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person in the database has the longest years in the program?",
    "SQL": "SELECT yearsInProgram FROM person ORDER BY yearsInProgram DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by Professor John Doe?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Professor' AND yearsInProgram = '10')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students in the database.",
    "SQL": "SELECT p_id FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all courses taught by person with ID 42.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 42",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years in the program for students who are in Phase 1?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE inPhase = 'Phase 1' AND student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person has been advised by multiple advisors?",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(DISTINCT p_id_dummy) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students each professor is advising?",
    "SQL": "SELECT T2.p_id, COUNT(T2.p_id) FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who is a professor and has been in the program for at least 5 years?",
    "SQL": "SELECT p_id FROM person WHERE professor = 1 AND yearsInProgram = '5+'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program for at least 5 years?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND yearsInProgram = '5 years or more'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names and courses of the professor who teaches the most courses.",
    "SQL": "SELECT T1.p_id, T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id ORDER BY COUNT(T2.course_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the database?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students currently in phase A of the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'A'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of courses taught by professors with more than 5 years of experience in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5 AND T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with the course ID 2?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(*) AS student_count, p_id AS professor_id FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who are also advisors?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN advisedBy AS T3 ON T2.p_id = T3.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 5?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) , p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professor with ID 20?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 20",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students advised by professor with ID 2.",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.p_id = 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students who have been advised by someone who is also a professor?",
    "SQL": "SELECT COUNT(T1.p_id) FROM advisedBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students who are advised by person ID 32.",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy = 32",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are all the unique course levels in the course table?",
    "SQL": "SELECT DISTINCT courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in phase 'Phase1'?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1 AND inPhase = 'Phase1'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position of 'Assistant Professor'?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Assistant Professor')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than one professor teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by professors in the 'hasPosition' field?",
    "SQL": "SELECT COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 AND T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the person IDs that are both professors and students.",
    "SQL": "SELECT p_id FROM person WHERE professor = 1 AND student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are being taught by a professor with ID 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have been in the program for more than 10 years?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 0 AND T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students enrolled in each course?",
    "SQL": "SELECT course_id, COUNT(p_id) FROM taughtBy GROUP BY course_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course levels of all courses taught by professor with ID 123?",
    "SQL": "SELECT DISTINCT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all courses taught by professors in phase 2?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Professor' AND T3.inPhase = 'Phase_2'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the course IDs of all courses taught by professors with more than 10 years in the program.",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students advised by professors who have been in the program for more than 5 years.",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor' AND T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by Professor X?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course taught by person ID 5?",
    "SQL": "SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT T1.p_id, COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of the courses taught by Professor Jane Doe?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.student = 0 AND T3.professor = 1 AND T3.yearsInProgram = '8'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT T1.p_id, COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'Level_500'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of courses taught by each person in the 'taughtBy' table.",
    "SQL": "SELECT p_id, COUNT(course_id) AS number_of_courses FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by a person who is a professor?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course(s) have at least 3 different professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the student IDs of students who are advised by at least one other student in the program.",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM advisedBy WHERE p_id != p_id_dummy)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT T2.p_id, COUNT(T1.course_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the level of the course with course ID 3?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there?",
    "SQL": "SELECT COUNT(*) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average course level for courses taught by professor with ID 5?",
    "SQL": "SELECT AVG(T2.courseLevel) FROM taughtBy AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are being taught by professors with more than 10 years of experience?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by Professor XYZ?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 'XYZ'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all students who are advised by professor with ID 123.",
    "SQL": "SELECT T1.student FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T2.p_id_dummy = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by at least two professors?",
    "SQL": "SELECT c.course_id FROM course AS c JOIN taughtBy AS tb ON c.course_id = tb.course_id JOIN person AS p ON tb.p_id = p.p_id WHERE p.professor = 1 GROUP BY c.course_id HAVING COUNT(tb.p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professor with ID 10?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT SUM(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with positions?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1 AND hasPosition IS NOT NULL)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 101?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with more than 10 years in the program?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than 3 professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years in the program for professors who have a position?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE hasPosition IS NOT NULL AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students who are advised by a professor with an assistant professor position.",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 AND T2.professor = 1 AND T2.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than one professor teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs that are taught by a professor with an advanced position.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.hasPosition = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in each course level?",
    "SQL": "SELECT COUNT(course_id) AS num_students, courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all the students in the database?",
    "SQL": "SELECT student FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students currently in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the people who are both students and have positions.",
    "SQL": "SELECT * FROM person WHERE student = 1 AND hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest level of a course?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of professors who have taught course ID 18?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the 'Master' level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Master'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all the courses that have been taught by a professor with the ID 101?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the 'graduate' level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'graduate'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for undergraduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_100'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with ID 10?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with years in program greater than 5?",
    "SQL": "SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of the courses that have at least two professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1 AND inPhase = 'Enrolled'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by at least one person?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(*) AS num FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the master/graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 10 years of experience in the program?",
    "SQL": "SELECT COUNT(*) FROM person AS P JOIN taughtBy AS T ON P.p_id = T.p_id WHERE P.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by person with ID 10?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with the position 'full'",
    "SQL": "SELECT DISTINCT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.hasPosition = 'full'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by a professor with position 'Full Professor'?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.hasPosition = 'Full Professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by person with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the professional level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Professional'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 123?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for the course with ID 12?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of all students in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT SUM(student) AS total_students FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "how many students are in each class level?",
    "SQL": "SELECT T2.courseLevel , COUNT(T1.student) FROM person AS T1 INNER JOIN course AS T2 ON T1.student = T2.course_id GROUP BY T2.courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course(s) have a course level of 'Level_600'?",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_600'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the highest level of course offered?",
    "SQL": "SELECT MAX(courseLevel) FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professor ID 5?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by a professor with the ID 100.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 100",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find all the courses taught by a professor with yearsInProgram greater than 5.",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the database?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all students in the database?",
    "SQL": "SELECT p_id FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT T2.p_id, COUNT(T1.course_id) AS course_count FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at each level?",
    "SQL": "SELECT courseLevel, COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors who have at least one graduate student in their advising list?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN advisedBy AS T3 ON T2.p_id = T3.p_id INNER JOIN person AS T4 ON T4.p_id = T3.p_id_dummy WHERE T4.student = 1 GROUP BY T1.course_id HAVING COUNT(DISTINCT T3.p_id) >= 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are Level 500 or above?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel LIKE 'Level_%'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find all the courses taught by professors in the person table.",
    "SQL": "SELECT T1.course_id FROM course AS T1 JOIN taughtBy AS T2 ON T1.course_id = T2.course_id JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the names of all students who have advised by a professor?",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 AND T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 23?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 23",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the total number of courses taught by each person?",
    "SQL": "SELECT COUNT(*) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of courses that are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1 AND yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 10 years?",
    "SQL": "SELECT course_id FROM taughtBy AS T1 JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "how many courses are offered by each professor?",
    "SQL": "SELECT COUNT(T2.course_id) , T1.p_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "The number of courses offered at the intermediate level",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'intermediate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the people who are both students and professors.",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by professors who have been in the program for more than 5 years.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.inPhase = '5years' AND T3.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs taught by professors.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND hasPosition = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a specific professor (e.g., professor ID 101)?",
    "SQL": "SELECT COUNT(p_id) FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM person WHERE p_id = 101)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT course_id FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.yearsInProgram > '5'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professors who are also students?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM person WHERE student = 1 AND professor = 0)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT SUM(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there for each course level?",
    "SQL": "SELECT courseLevel, COUNT(course_id) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(*) AS num_students, T1.p_id AS professor_id FROM person AS T1 JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in Phase 2 of the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase 2'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the IDs of all students who are advised by at least two other students.",
    "SQL": "SELECT p_id FROM advisedBy GROUP BY p_id HAVING COUNT(p_id_dummy) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor has the most students?",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id ORDER BY COUNT(T2.p_id_dummy) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the number of students each professor is advising.",
    "SQL": "SELECT COUNT(T2.p_id) AS numStudents, T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there in each level?",
    "SQL": "SELECT COUNT(*) , courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses at the undergraduate level.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_100'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each advisor?",
    "SQL": "SELECT COUNT(p_id), p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor ID 5?",
    "SQL": "SELECT DISTINCT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the professor who is teaching the highest number of courses?",
    "SQL": "SELECT T1.professor FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.professor ORDER BY COUNT(*) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the person table?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who are in the phase of being actively involved?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN ( SELECT p_id FROM person WHERE hasPosition = 'Professor' AND inPhase = 'Active' )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of distinct courses taught by professor ID 12?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 12",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id IN ( SELECT p_id FROM person WHERE yearsInProgram > 5 AND professor = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "list all person IDs where a person is both a professor and a student",
    "SQL": "SELECT p_id FROM person WHERE professor = 1 AND student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have a position?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition IS NOT NULL",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in phase 2 of the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1 AND inPhase = 'Phase_2'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find all the students who have advised by a professor who teaches course ID 18.",
    "SQL": "SELECT T3.student FROM taughtBy AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id INNER JOIN person AS T3 ON T2.p_id_dummy = T3.p_id WHERE T1.course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at each level?",
    "SQL": "SELECT COUNT(course_id), courseLevel FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are all the students who have been advised by a professor?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 AND T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each person?",
    "SQL": "SELECT COUNT(p_id_dummy), p_id FROM advisedBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently enrolled in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than two professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and corresponding course levels?",
    "SQL": "SELECT course_id, courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by Professor John?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = (SELECT p_id FROM person WHERE professor = 1 AND hasPosition LIKE '%Professor John%')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students who are advised by a professor.",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND p_id IN (SELECT p_id_dummy FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1))",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the person IDs of those who are both students and professors.",
    "SQL": "SELECT p_id FROM person WHERE student = 1 AND professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the level of the course with course ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professor with ID 123?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by person ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(*) AS numCourses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are there in total?",
    "SQL": "SELECT COUNT(student) AS total_students FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position of 'AsstProf'?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T3.hasPosition = 'AsstProf'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with more than 10 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS total_courses, p_id AS professor_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have a position?",
    "SQL": "SELECT COUNT(DISTINCT t2.course_id) FROM person AS t1 INNER JOIN taughtBy AS t2 ON t1.p_id = t2.p_id WHERE t1.hasPosition = 'yes'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T2.p_id) AS numStudents, T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses with a courseLevel of 'Graduate'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs for courses taught by a professor with the ID 101?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the professor who is teaching course ID 18?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person IDs are both advisors and taught courses?",
    "SQL": "SELECT p_id FROM advisedBy INTERSECT SELECT p_id FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a professor with a position of 'Associate Professor'?",
    "SQL": "SELECT COUNT(DISTINCT T2.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Associate Professor' AND T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(p_id) AS student_count FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course(s) are taught by professor with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many different courses are taught by professor with ID 1?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with more than 5 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students in the person table?",
    "SQL": "SELECT COUNT(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who are all the students who are advised by a professor with the position 'PI'?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM person WHERE hasPosition = 'PI' AND student = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of years students have been in the program?",
    "SQL": "SELECT AVG(yearsInProgram) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses that have more than one professor teaching them?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM taughtBy GROUP BY p_id HAVING COUNT(course_id) > 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course with ID 10?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the student IDs of students who are advised by professor with ID 101.",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE person.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for at least 5 years?",
    "SQL": "SELECT DISTINCT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.yearsInProgram >= 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "list all the students under an advisor",
    "SQL": "SELECT p_id_dummy FROM advisedBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT T1.p_id, COUNT(T2.course_id) AS numCourses FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a professor with more than 10 years of experience?",
    "SQL": "SELECT COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 AND T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have more than 10 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > '10 years'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the names of all courses with a course level of 'Level_400'.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have advised by at least one other student?",
    "SQL": "SELECT COUNT(DISTINCT p_id) FROM advisedBy WHERE p_id_dummy IN (SELECT p_id FROM advisedBy)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are there at the master/graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the course IDs taught by professors with the position 'Research Scientist'.",
    "SQL": "SELECT DISTINCT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'Research Scientist'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 54?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 54",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(p_id) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professors with more than 10 years in the program?",
    "SQL": "SELECT COUNT(T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have been taught by professors with more than 5 years in the program?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'Professor' AND yearsInProgram > 5)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are being taught by professors who have more than 5 years in the program?",
    "SQL": "SELECT T2.course_id, T1.p_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have more than 5 professors teaching them?",
    "SQL": "SELECT T2.course_id, T2.courseLevel FROM taughtBy AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(T1.p_id) > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each person?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of courses that are taught by more than one professor.",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses have a course level of 'Advanced'?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Advanced'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the person who teaches the course with course_id 1?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for a course with ID 18?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 18",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course has the highest average number of students advised?",
    "SQL": "SELECT T1.course_id, T1.courseLevel, AVG(T2.p_id) AS avg_num_students FROM course AS T1 INNER JOIN advisedBy AS T2 ON T2.p_id = T1.course_id GROUP BY T1.course_id ORDER BY avg_num_students DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have no professors assigned to teach them?",
    "SQL": "SELECT course_id FROM course WHERE course_id NOT IN (SELECT course_id FROM taughtBy)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the professors who have advised at least two students.",
    "SQL": "SELECT T1.p_id FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id HAVING COUNT(DISTINCT T2.p_id_dummy) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have at least 5 years in the program?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram >= '5 years'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 5 years in the program?",
    "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",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by person ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students each professor is advising?",
    "SQL": "SELECT T1.hasPosition, COUNT(*) FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT T1.p_id, COUNT(T2.course_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors have been advised by at least one student?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id IN (SELECT p_id FROM person WHERE professor = 1)",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(T1.course_id), T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by a professor with position 'professor'?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor' AND T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(student) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the course with the lowest average number of students per professor?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id, T1.courseLevel ORDER BY AVG(T2.p_id) LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_400'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are there in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by person with ID 123?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for undergraduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_100'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List the course IDs of all courses taught by professor with ID 3.",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(*) AS num_students FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all course IDs that have at least one professor assigned to teach them.",
    "SQL": "SELECT course_id FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professors are advising students in the system?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id = 0",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors who have been in the program for at least 5 years?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram >= 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which professor(s) is/are teaching course ID 20?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 20",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course has the highest number of students advised by a single professor?",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN advisedBy AS T2 ON T1.course_id = T2.p_id WHERE T1.courseLevel = 'Graduate' GROUP BY T2.p_id ORDER BY COUNT(T1.course_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person is the advisor of person with ID 1?",
    "SQL": "SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the professor ID of the person who is teaching course ID 10?",
    "SQL": "SELECT p_id FROM taughtBy WHERE course_id = 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses have at least 3 professors teaching them?",
    "SQL": "SELECT course_id FROM taughtBy GROUP BY course_id HAVING COUNT(DISTINCT p_id) >= 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many people have been advised by more than one person?",
    "SQL": "SELECT COUNT(*) FROM advisedBy GROUP BY p_id_dummy HAVING COUNT(p_id) > 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by professors with positions in the program.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.hasPosition = 'yes'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by people who have a professor position?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students who are advised by at least one advisor?",
    "SQL": "SELECT COUNT(DISTINCT p_id) AS total_students_advised FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of professors teaching each course?",
    "SQL": "SELECT COUNT(DISTINCT p_id), course_id FROM taughtBy GROUP BY course_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students for each advisor?",
    "SQL": "SELECT COUNT(p_id), p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position of 'professor'?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(p_id), p_id_dummy FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id), p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs of all courses taught by Professor John Doe?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.hasPosition = 'Professor John Doe'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position of 'professor'?",
    "SQL": "SELECT COUNT(*) FROM person AS p JOIN taughtBy AS t ON p.p_id = t.p_id WHERE p.hasPosition = 'professor'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT T2.p_id_dummy AS student, COUNT(DISTINCT T2.p_id) AS num_advisors FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.student = 1 GROUP BY T2.p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Who teaches the course with the ID 123?",
    "SQL": "SELECT T2.professor FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.course_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the course IDs and their corresponding levels?",
    "SQL": "SELECT course_id, courseLevel FROM course",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by person with ID 1?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with more than 10 years in the program?",
    "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 > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course that has the course ID 3?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of distinct students advised by each professor?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id_dummy), T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T2.p_id = T1.p_id_dummy GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with years in program greater than 5?",
    "SQL": "SELECT DISTINCT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in the program for more than 5 years?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND yearsInProgram > 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the total number of students in the database.",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are level 500?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each advisor?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) AS num_students, COUNT(DISTINCT p_id) AS num_advisors FROM advisedBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of course ID 200?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 200",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the name of the course with the highest enrollment?",
    "SQL": "SELECT T1.course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T1.course_id ORDER BY COUNT(T1.p_id) DESC LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many distinct courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by Professor Smith?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are supervised by each professor?",
    "SQL": "SELECT COUNT(DISTINCT p_id_dummy) AS num_students FROM advisedBy WHERE p_id IN ( SELECT p_id FROM person WHERE professor = 1 )",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "SQL query to find all the course IDs taught by a professor with ID 123",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors in the person table?",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level of the course with ID 1?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Fill in the blank for the following SQL query: SELECT course_id FROM course WHERE courseLevel = ____",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Find the number of students advised by a specific professor.",
    "SQL": "SELECT COUNT(*) FROM advisedBy ab JOIN person p ON ab.p_id_dummy = p.p_id WHERE p.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors?",
    "SQL": "SELECT COUNT(*) FROM taughtBy INNER JOIN person ON taughtBy.p_id = person.p_id WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by person with ID 1?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many professors taught at least two courses?",
    "SQL": "SELECT COUNT(DISTINCT T1.p_id) AS numProfessors FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T1.p_id HAVING COUNT(T1.course_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by professor with ID 123?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT SUM(student) FROM person",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for undergraduate courses.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_200'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professors with a position in the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) AS count FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.student = 0 AND T2.hasPosition = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the intermediate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Intermediate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What are the levels of courses that have been taught by person ID 5?",
    "SQL": "SELECT DISTINCT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by a professor with ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by the professor with ID 5?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T2.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by professor ID 123?",
    "SQL": "SELECT COUNT(*) FROM advisedBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by person with p_id 1?",
    "SQL": "SELECT COUNT(*) FROM taughtBy WHERE p_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors in phase 2 of the program?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 AND T2.inPhase = 'Phase_2'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the course level for course ID 1?",
    "SQL": "SELECT courseLevel FROM course WHERE course_id = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS num_courses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who are also advisors?",
    "SQL": "SELECT course_id FROM taughtBy INNER JOIN advisedBy ON taughtBy.p_id = advisedBy.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the students advised by a particular professor.",
    "SQL": "SELECT T1.student FROM person AS T1 INNER JOIN advisedBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by professor with ID 101?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 101",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(*) AS totalCourses, p_id AS professorID FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a person with a specific position?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id IN (SELECT p_id FROM person WHERE hasPosition = 'specific position')",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in each phase of the program?",
    "SQL": "SELECT COUNT(student), inPhase FROM person WHERE student = 1 GROUP BY inPhase",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are offered at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Level_700'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professor with ID 5?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students have been advised by person ID 3?",
    "SQL": "SELECT COUNT(*) FROM advisedBy WHERE p_id = 3 AND p_id_dummy = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by a professor with p_id 5?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the Level_500 level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at each level?",
    "SQL": "SELECT courseLevel, COUNT(*) FROM course GROUP BY courseLevel",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students enrolled in each course?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors with a position of 'hasPosition'",
    "SQL": "SELECT COUNT(*) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition = 'hasPosition'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Is there any person in the student phase?",
    "SQL": "SELECT 1 FROM person WHERE inPhase = 'student' LIMIT 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT T1.course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the courses taught by Professor Smith.",
    "SQL": "SELECT T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.professor = 1 AND T3.student = 0",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors with a position other than 'assistant'?",
    "SQL": "SELECT course_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.hasPosition != 'assistant'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of students in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by at least one professor?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are taught by a professor with ID 100?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy WHERE p_id = 100",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are in phase 3?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Phase_3'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) AS number_of_courses, p_id FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the undergraduate level?",
    "SQL": "SELECT COUNT(course_id) FROM course WHERE courseLevel = 'Undergraduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Graduate'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are being advised by the person with ID 5?",
    "SQL": "SELECT T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T1.p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professors with years in the program greater than 10?",
    "SQL": "SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T2.p_id = T3.p_id WHERE T3.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What courses are taught by professor with ID 123?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 123",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the number of students advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) , T2.professor FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.professor",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of professors in the database?",
    "SQL": "SELECT COUNT(*) FROM person WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 5 years?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > '5 years'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which person has both a professor and student role in the database?",
    "SQL": "SELECT p_id FROM person WHERE professor = 1 AND student = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are currently in the program?",
    "SQL": "SELECT COUNT(*) FROM person WHERE student = 1 AND inPhase = 'Current'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many people in the database have a professor position?",
    "SQL": "SELECT COUNT(*) FROM person WHERE professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many students are advised by each professor?",
    "SQL": "SELECT COUNT(T1.p_id) AS num_students, T2.p_id AS professor_id FROM advisedBy AS T1 JOIN person AS T2 ON T2.p_id = T1.p_id_dummy WHERE T2.professor = 1 GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which students are advised by professor ID 3?",
    "SQL": "SELECT p_id FROM advisedBy WHERE p_id_dummy = 3",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many distinct courses are taught by professors?",
    "SQL": "SELECT COUNT(DISTINCT course_id) FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are being taught by professor ID 5?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 5",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(*) AS totalCourses, T2.p_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T2.p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by professors who have been in the program for more than 10 years?",
    "SQL": "SELECT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.yearsInProgram > 10",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "How many courses are at the graduate level?",
    "SQL": "SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_700'",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which courses are taught by at least two professors?",
    "SQL": "SELECT T1.course_id FROM course AS T1 JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(T2.p_id) >= 2",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "Which course is taught by the professor with the ID 234?",
    "SQL": "SELECT course_id FROM taughtBy WHERE p_id = 234",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the count of students associated with each advisor in the advisedBy table?",
    "SQL": "SELECT p_id_dummy, COUNT(p_id) AS student_count FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the average number of students for each advisor?",
    "SQL": "SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "What is the total number of courses taught by each professor?",
    "SQL": "SELECT COUNT(course_id) FROM taughtBy GROUP BY p_id",
    "db_id": "computer_student",
    "evidence": ""
  },
  {
    "question": "List all the course IDs for courses that are at the undergraduate level.",
    "SQL": "SELECT course_id FROM course WHERE courseLevel = 'Level_300'",
    "db_id": "computer_student",
    "evidence": ""
  }
]