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 average satisfying degree of the course Machine Learning Theory? sat refers to student's satisfaction degree with the course;

    【Evidence】
    sat refers to student's satisfaction degree with the course;

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

SQL: SELECT CAST(SUM(T1.sat) AS REAL) / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = 'Machine Learning Theory'
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】
    Give the number of research postgraduate students. RPG is an abbreviated name of research postgraduate student in which type = 'RPG';

    【Evidence】
    RPG is an abbreviated name of research postgraduate student in which 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 COUNT(student_id) FROM student WHERE 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】
    Which student has the highest gpa? Give the full name. GPA is an abbreviated name of Grade Point Average where highest GPA = MAX(gpa); full name refers to f_name and l_name;

    【Evidence】
    GPA is an abbreviated name of Grade Point Average where highest GPA = MAX(gpa); full name refers to f_name and l_name;

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

SQL: SELECT f_name, l_name FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student )
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】
    For the 3-credit course with the easiest difficulty, how many students get an "A" in that course? diff refers to difficulty; diff is higher means the course is more difficult in which easiest difficulty refers to diff = 1; 3-credit course refers to credit = '3'; get an "A" refers to grade = 'A' for the course;

    【Evidence】
    diff refers to difficulty; diff is higher means the course is more difficult in which easiest difficulty refers to diff = 1; 3-credit course refers to credit = '3'; get an "A" refers to grade = 'A' for the course;

    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 registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.credit = '3' AND T2.diff = 1
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】
    How many students took the hardest course? diff refers to difficulty; diff is higher means the course is more difficult in which hardest difficulty is expressed as diff = 5;

    【Evidence】
    diff refers to difficulty; diff is higher means the course is more difficult in which hardest difficulty is expressed as diff = 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(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.diff = 5
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】
    Which professor is Oliy Spratling working with? Give the full name. research assistant refers to the student who serves for research where the abbreviation is RA; full name refers to f_name and l_name;

    【Evidence】
    research assistant refers to the student who serves for research where the abbreviation is RA; full name refers to f_name and l_name;

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

SQL: SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Oliy' AND T3.l_name = 'Spratling'
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】
    For the professor who is working with Harrietta Lydford, how is his popularity? research assistant refers to the student who serves for research where the abbreviation is RA; higher popularity means more popular; prof_id refers to professor’s ID;

    【Evidence】
    research assistant refers to the student who serves for research where the abbreviation is RA; higher popularity means more popular; prof_id refers to professor’s 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.popularity FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Harrietta' AND T3.l_name = 'Lydford'
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】
    How many research assistants does the female professor with the lowest teaching ability have? research assistant refers to the student who serves for research where the abbreviation is RA; professor with the lowest teaching ability refers to prof_id where teachability = '1';

    【Evidence】
    research assistant refers to the student who serves for research where the abbreviation is RA; professor with the lowest teaching ability refers to prof_id where teachability = '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.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability = '1' AND T2.gender = 'Female'
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】
    For the professors who advise more than 2 students, which professor has a higher teaching ability? Give the full name. professor advising more than 2 students refers to COUNT(student_id) > 2; higher teachability refers to MAX(teachingability); full name refers to f_name and l_name;

    【Evidence】
    professor advising more than 2 students refers to COUNT(student_id) > 2; higher teachability refers to MAX(teachingability); full name refers to f_name and l_name;

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

SQL: SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, T2.teachingability FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id GROUP BY T1.prof_id HAVING COUNT(student_id) > 2 ) T ORDER BY T.teachingability DESC LIMIT 1
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】
    Give the grade score for Rik Unsworth in "Computer Network". Academic grades awarded for participation in a course are A, B, C, D and F where Grade 'A' means excellent, Grade 'B' means good, Grade 'C' means fair, Grade 'D' means poorly pass, if grade is null or empty, it means that this student fails to pass this course in which grade = NULL;

    【Evidence】
    Academic grades awarded for participation in a course are A, B, C, D and F where Grade 'A' means excellent, Grade 'B' means good, Grade 'C' means fair, Grade 'D' means poorly pass, if grade is null or empty, it means that this student fails to pass this course in which grade = NULL;

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

SQL: SELECT CASE grade WHEN 'A' THEN 4 WHEN 'B' THEN 3 WHEN 'C' THEN 2 ELSE 1 END AS result FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE f_name = 'Rik' AND l_name = 'Unsworth' AND course_id IN ( SELECT course_id FROM course WHERE name = 'Computer Network' ) )