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】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    What is the salary range of the student with an email of grosellg@hku.hk? salary range refers to salary;

    【Evidence】
    salary range refers to salary;

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

SQL: SELECT T1.salary FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.email = 'grosellg@hku.hk'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    Among students that gave satisfaction of value 4 for the course named "Statistical Learning", how many of them have a gpa of 3.8? satisfaction refers to sat;

sat = 4; gpa = 3.8

    【Evidence】
    satisfaction refers to sat;

sat = 4; gpa = 3.8 

    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.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Statistical learning' AND T2.sat = 4 AND T1.gpa = 3.8
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    Among courses with difficulty of 3, how many students have intellegence level of 2? difficulty of 3 refers to diff = 3; intelligence = 2

    【Evidence】
    difficulty of 3 refers to diff = 3; intelligence = 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(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.diff = 3 AND T1.intelligence = 2
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    List the student's first and last name that got a C in the course named "Applied Deep Learning". student's first name refers to f_name; student's last name refers to l_name; got a C refers to grade = 'C';

    【Evidence】
    student's first name refers to f_name; student's last name refers to l_name; got a C refers to grade = 'C';

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

SQL: SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Applied Deep Learning ' AND T2.grade = 'C'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    Among research postgraduate students, give the name of the course with the student satisfaction value of 1. research postgraduate students refers to type = 'RPG'; name of the course refers to name; satisfaction refers to sat; sat = 1;

    【Evidence】
    research postgraduate students refers to type = 'RPG'; name of the course refers to name; satisfaction refers to sat; sat = 1;

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

SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.sat = 1 AND T1.type = 'RPG'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 cs_semester
【Schema】
# Table: student
[
(student_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(f_name:TEXT, Examples: [Kerry, Chrysa, Elsy]),
(l_name:TEXT, Examples: [Pryor, Dine-Hart, Shiril]),
(phone_number:TEXT, Examples: [(243) 6836472, (672) 9245255, (521) 7680522]),
(email:TEXT),
(intelligence:INTEGER, Examples: [5, 2, 1]),
(gpa:REAL, Examples: [2.4, 2.7, 3.5]),
(type:TEXT, Examples: [RPG, TPG, UG])
]
# Table: prof
[
(prof_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(gender:TEXT, Examples: [Male, Female]),
(first_name:TEXT, Examples: [Nathaniel, Zhihua, Ogdon]),
(last_name:TEXT, Examples: [Pigford, Zhou, Zywicki]),
(email:TEXT),
(popularity:INTEGER, Examples: [3, 2]),
(teachingability:INTEGER, Examples: [5, 1, 2]),
(graduate_from:TEXT, Examples: [University of Washington])
]
# Table: registration
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(student_id:INTEGER, Primary Key, Examples: [2, 3, 4]),
(grade:TEXT, Examples: [A, B, C]),
(sat:INTEGER, Examples: [5, 4, 3])
]
# Table: course
[
(course_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Machine Learning Theory]),
(credit:INTEGER, Examples: [3, 2]),
(diff:INTEGER, Examples: [3, 4, 1])
]
# Table: RA
[
(student_id:INTEGER, Primary Key, Examples: [2, 5, 6]),
(capability:INTEGER, Examples: [2, 5, 4]),
(prof_id:INTEGER, Primary Key, Examples: [7, 10, 13]),
(salary:TEXT, Examples: [med, high, low])
]
【Foreign keys】
registration.course_id=course.course_id
registration.student_id=student.student_id
RA.prof_id=prof.prof_id
RA.student_id=student.student_id

    【Question】
    Among the students with a capability below 3, what is the difference of undergraduate students from research postgraduate students? capability < 3; difference = subtract(count(type = 'UG')), (count(type = 'RPG')); undergraduate students refers to type = 'UG'; research postgraduate students refers to type = 'RPG';

    【Evidence】
    capability < 3; difference = subtract(count(type = 'UG')), (count(type = 'RPG')); undergraduate students refers to type = 'UG'; research postgraduate students refers to type = 'RPG';

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

SQL: SELECT SUM(CASE WHEN T2.type = 'UG' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.type = 'RPG' THEN 1 ELSE 0 END) FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.capability < 3
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 average number of students for each advisor? students refers to advisedBy.p_id; advisor refers to p_id_dummy; average number = avg(count(advisedBy.p_id))

    【Evidence】
    students refers to advisedBy.p_id; advisor refers to p_id_dummy; average number = avg(count(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 CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy
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 are teaching course ID 18? professors refers to taughtBy.p_id; course ID 18 refers to taughtBy.course_id

    【Evidence】
    professors refers to taughtBy.p_id; course ID 18 refers to 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 COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18
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】
    List all the course IDs for professional or master/graduate courses. professional or master/graduate courses refers to courseLevel = 'Level_500'

    【Evidence】
    professional or master/graduate 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 course_id FROM course WHERE 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】
    How many courses are there for basic or medium undergraduate courses? basic or medium undergraduate courses refers to courseLevel = 'Level_300'; courses refers to course.course_id

    【Evidence】
    basic or medium undergraduate courses refers to courseLevel = 'Level_300'; courses refers to course.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 COUNT(course_id) FROM course WHERE 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】
    List the ID of all professors who are not faculty member along with the courses taught by him/her. ID of all professors refers to person.p_id where professor = 1; not faculty member refers to hasPosition = 0; courses refers to taughtBy.course_id

    【Evidence】
    ID of all professors refers to person.p_id where professor = 1; not faculty member refers to hasPosition = 0; courses refers to 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 T2.p_id, 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 <> 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】
    Provide the ID of professors who are teaching high-level or harder undergraduate course. ID of professors refers to taughtBy.p_id; high-level or harder undergraduate course refers to courseLevel = 'Level_400'

    【Evidence】
    ID of professors refers to taughtBy.p_id; high-level or harder undergraduate course refers to courseLevel = 'Level_400'

    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_400'