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】
    Among undergraduate students, list the name of the course with the highest student satisfaction. Undergraduate students refers to type = 'UG'; satisfaction refers to sat; highest satisfaction refers to MAX(sat);

    【Evidence】
    Undergraduate students refers to type = 'UG'; satisfaction refers to sat; highest satisfaction refers to MAX(sat);

    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 T1.type = 'UG' ORDER BY T2.sat 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】
    List the capability of research postgraduate students with an intellegence level of 4 and above. research postgraduate students refers to type = 'RPG'; intelligence level of 4 and above refers to intelligence > = 4;

    【Evidence】
    research postgraduate students refers to type = 'RPG'; intelligence level of 4 and above refers to intelligence > = 4;

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

SQL: SELECT T1.capability FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.type = 'RPG' AND T2.intelligence >= 4
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】
    In students with a grade of B, how many of them have an intellegence level of 3?

    【Evidence】
    

    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 student AS T2 ON T1.student_id = T2.student_id WHERE T1.grade = 'B' AND T2.intelligence = 3
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 difficulty of the course in which a student with level of intellengence of 5 got an A grade? difficulty of the course refers to diff;

    【Evidence】
    difficulty of the course refers to diff;

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

SQL: SELECT T3.diff 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.grade = 'A' AND T1.intelligence = 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】
    Among professors with the highest popularity, how many of their students have research capability of 5? highest popularity refers to MAX(popularity); research capability refers to capability; capability = 5;

    【Evidence】
    highest popularity refers to MAX(popularity); research capability refers to capability; capability = 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 RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T1.capability = 5 ORDER BY T2.popularity 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】
    List the course's name where students acquired a grade of D.

    【Evidence】
    

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

SQL: SELECT T1.name FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T2.grade = 'D'
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 capability on research of the student named Alvera McQuillin? capability on research refers to capability;

    【Evidence】
    capability on research refers to capability;

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

SQL: SELECT T2.capability FROM student AS T1 INNER JOIN RA AS T2 ON T1.student_id = T2.student_id WHERE T1.f_name = 'Alvera' AND T1.l_name = 'McQuillin'
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】
    Of courses with 3 credit, how many students have GPA of 3.2?

    【Evidence】
    

    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.credit = 3 AND T1.gpa = 3.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】
    Among students with low salary, how many of them have a gpa of 3.5? low salary refers to salary = 'low';

    【Evidence】
    low salary refers to salary = 'low';

    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 student AS T2 ON T1.student_id = T2.student_id WHERE T2.gpa = 3.5 AND T1.salary = 'low'
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 email with grade of B in a course with difficulty greater than the 80% of average difficulty of all courses. difficulty refers to diff; course with difficulty greater than the 80% of average difficulty refers to diff > MULTIPLY(AVG(diff), 80%);

    【Evidence】
    difficulty refers to diff; course with difficulty greater than the 80% of average difficulty refers to diff > MULTIPLY(AVG(diff), 80%);

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

SQL: SELECT T2.email FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T1.grade = 'B' GROUP BY T3.diff HAVING T3.diff > AVG(T3.diff) * 0.8