QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    How many non-faculty members are not undergoing the phase of qualifications? non-faculty members refers to hasPosition = 0; are not undergoing the phase of qualifications refers to inPhase = 0

    【Evidence】
    non-faculty members refers to hasPosition = 0; are not undergoing the phase of qualifications refers to inPhase = 0

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM person WHERE hasPosition = 0 AND inPhase = 0
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Which professor taught the least amount of courses? professor refers to taughtBy.p_id; least amount of courses refers to min(count(course_id))

    【Evidence】
    professor refers to taughtBy.p_id; least amount of courses refers to min(count(course_id))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT p_id FROM taughtBy GROUP BY p_id ORDER BY COUNT(course_id) ASC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Among the students being advised by Advisor 5, how many students are in the 5th year? Advisor 5 refers to p_id_dummy = 5; are in the 5th year refers to yearsInProgram = 'Year_5'

    【Evidence】
    Advisor 5 refers to p_id_dummy = 5; are in the 5th year refers to yearsInProgram = 'Year_5'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy = 5 AND T2.student = 1 AND T2.yearsInProgram = 'Year_5'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Which professor teaches the highest number of professional or master/graduate courses? professor refers to taughtBy.p_id; highest number of professional or master/graduate courses refers to max(count(taughtBy.course_id)) where courseLevel = 'Level_500'

    【Evidence】
    professor refers to taughtBy.p_id; highest number of professional or master/graduate courses refers to max(count(taughtBy.course_id)) where courseLevel = 'Level_500'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500' GROUP BY T2.p_id ORDER BY COUNT(T2.course_id) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses? faculty affiliated professor refers to professor = 1 and hasPosition = 'Faculty_aff'; professional or master/undergraduate courses refers to courseLevel = 'Level_500'

    【Evidence】
    faculty affiliated professor refers to professor = 1 and hasPosition = 'Faculty_aff'; professional or master/undergraduate courses refers to courseLevel = 'Level_500'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) 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.hasPosition = 'Faculty_aff' AND T1.professor = 1 AND T3.courseLevel = 'Level_500'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Who are the top 5 professors who teaches the highest number of professional or master/undergraduate courses? professors refers to course.p_id; highest number of professional or master/undergraduate courses refers to max(count(course.course_id)) where courseLevel = 'Level_500'

    【Evidence】
    professors refers to course.p_id; highest number of professional or master/undergraduate courses refers to max(count(course.course_id)) where courseLevel = 'Level_500'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500' GROUP BY T2.p_id ORDER BY COUNT(T2.p_id) DESC LIMIT 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    How many advisors are in charge of advising all the students in 1st year? advisors refers to p_id_dummy; students in 1st year refers to student = 1 and yearsInProgram = 'Year_1'

    【Evidence】
    advisors refers to p_id_dummy; students in 1st year refers to student = 1 and yearsInProgram = 'Year_1'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_1' AND T2.student = 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    How many professors teaches no more than two high-level or harder undergraduate courses? professors refers to taughtBy.p_id; high-level or harder undergraduate courses  refers to courseLevel = 'Level_400' ; no more than two refers to count(taughtBy.course_id) < = 2

    【Evidence】
    professors refers to taughtBy.p_id; high-level or harder undergraduate courses  refers to courseLevel = 'Level_400' ; no more than two refers to count(taughtBy.course_id) < = 2

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM ( SELECT COUNT(T2.p_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_400' GROUP BY T2.p_id HAVING COUNT(DISTINCT T1.course_id) <= 2 )
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Between the faculty employee professors, how many teaches high-level or harder undergraduate courses? Indicate each of the professors unique identifying number. faculty employee professors refers to hasPosition = 'Faculty_eme' and professor = 1; high-level or harder undergraduate courses refers to courseLevel = 'Level_400'; professors unique identifying number refers to person.p_id

    【Evidence】
    faculty employee professors refers to hasPosition = 'Faculty_eme' and professor = 1; high-level or harder undergraduate courses refers to courseLevel = 'Level_400'; professors unique identifying number refers to person.p_id

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) 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.hasPosition = 'Faculty_eme' AND T1.professor = 1 AND T3.courseLevel = 'Level_400'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    What is the position in the faculty of the professor who teaches the highest number of courses? position in the faculty refers to hasPosition; professor refers to professor = 1; teaches the highest number of courses refers to max(count(taughtBy.course_id))

    【Evidence】
    position in the faculty refers to hasPosition; professor refers to professor = 1; teaches the highest number of courses refers to max(count(taughtBy.course_id))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.hasPosition FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 GROUP BY T1.p_id ORDER BY COUNT(T2.course_id) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    What year in the program do the students with more than 2 advisors are in? students refers to student = 1; more than 2 advisors refers to count(p_id_dummy) > 2

    【Evidence】
    students refers to student = 1; more than 2 advisors refers to count(p_id_dummy) > 2

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.yearsInProgram 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 HAVING COUNT(T2.p_id) > 2
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    How many professors teaches basic or medium undergraduate courses? professors refers to taughtBy.p_id; basic or medium undergraduate courses refers to couresLevel = 'Level_300'

    【Evidence】
    professors refers to taughtBy.p_id; basic or medium undergraduate courses refers to couresLevel = 'Level_300'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    Among the students being advised by advisors, which students' year in the program do the advisors advise the majority of? students refers to student = 1; students' year in the program do the advisors advise the majority of refers to max(count(yearsInProgram))

    【Evidence】
    students refers to student = 1; students' year in the program do the advisors advise the majority of refers to max(count(yearsInProgram))

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.yearsInProgram FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.student = 1 GROUP BY T2.yearsInProgram ORDER BY COUNT(T1.p_id_dummy) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 computer_student
【Schema】
# Table: taughtBy
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(p_id:INTEGER, Primary Key, Examples: [40, 180, 279])
]
# Table: person
[
(p_id:INTEGER, Primary Key, Examples: [3, 4, 5]),
(professor:INTEGER, Examples: [0, 1]),
(student:INTEGER, Examples: [1, 0]),
(hasPosition:TEXT, Examples: [0, Faculty, Faculty_adj]),
(inPhase:TEXT, Examples: [0, Post_Quals, Post_Generals]),
(yearsInProgram:TEXT, Examples: [0, Year_2, Year_5])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [0, 1, 2]),
(courseLevel:TEXT, Examples: [Level_500, Level_300, Level_400])
]
# Table: advisedBy
[
(p_id:INTEGER, Primary Key, Examples: [6, 9, 13]),
(p_id_dummy:INTEGER, Primary Key, Examples: [5, 7, 29])
]
【Foreign keys】
taughtBy.p_id=person.p_id
taughtBy.course_id=course.course_id
advisedBy.p_id=person.p_id
advisedBy.p_id_dummy=person.p_id

    【Question】
    How many students that are undergoing the pre-phase of qualification have advisors? students refers to student = 1 and ; undergoing the phase of pre-qualification refers to inPhase = 'Pre-Quals'; have advisors refers to advisedBy.p_id

    【Evidence】
    students refers to student = 1 and ; undergoing the phase of pre-qualification refers to inPhase = 'Pre-Quals'; have advisors refers to advisedBy.p_id

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.inPhase = 'Pre_Quals' AND T2.student = 1