jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE teaches (course_id VARCHAR, id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR)
user: 按字母顺序列出2008年所有课程名称及其老师姓名。

assistant: SELECT T1.title ,  T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id  =  T2.course_id JOIN instructor AS T3 ON T2.id  =  T3.id WHERE YEAR  =  2008 ORDER BY T1.title
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE teaches (course_id VARCHAR, id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR)
user: 按照名称的字母顺序，显示2008年所有课程的名称和导师的姓名。

assistant: SELECT T1.title ,  T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id  =  T2.course_id JOIN instructor AS T3 ON T2.id  =  T3.id WHERE YEAR  =  2008 ORDER BY T1.title
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE advisor (i_id VARCHAR)
user: 找出指导一个以上学生的老师的名字。

assistant: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id  =  T2.i_id GROUP BY T2.i_id HAVING count(*)  >  1
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE advisor (i_id VARCHAR)
user: 指导一个以上学生的老师的名字是什么？

assistant: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id  =  T2.i_id GROUP BY T2.i_id HAVING count(*)  >  1
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE advisor (s_id VARCHAR)
user: 找到有不止一个导师的学生的名字？

assistant: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id  =  T2.s_id GROUP BY T2.s_id HAVING count(*)  >  1
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE advisor (s_id VARCHAR)
user: 有一个以上顾问的学生的名字是什么？

assistant: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id  =  T2.s_id GROUP BY T2.s_id HAVING count(*)  >  1
Schema: CREATE TABLE classroom (building VARCHAR, capacity INTEGER)
user: 找到每个容量超过50的建筑的房间数。

assistant: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
Schema: CREATE TABLE classroom (building VARCHAR, capacity INTEGER)
user: 每栋建筑有多少房间容量超过50？

assistant: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
Schema: CREATE TABLE classroom (building VARCHAR, capacity INTEGER)
user: 找出每个建筑物所有房间的最大和平均容量。

assistant: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
Schema: CREATE TABLE classroom (building VARCHAR, capacity INTEGER)
user: 每个楼房的最大和平均容量是多少？

assistant: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
Schema: CREATE TABLE course (title VARCHAR)
user: 找到一个由不止一个院系提供的课程的标题。

assistant: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
Schema: CREATE TABLE course (title VARCHAR)
user: 不止一个院系提供的课程名称是什么？

assistant: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
Schema: CREATE TABLE course (dept_name VARCHAR, credits INTEGER)
user: 查找不同院系提供的课程总学分。

assistant: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
Schema: CREATE TABLE course (dept_name VARCHAR, credits INTEGER)
user: 每个部门总共提供多少学分？

assistant: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
user: 找出平均工资高于所有教师平均工资的院系的最低工资。

assistant: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
user: 平均工资高于总平均水平的院系最低工资是多少？

assistant: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
Schema: CREATE TABLE SECTION (semester VARCHAR, YEAR VARCHAR)
user: 查找每学期和一年提供的课程数量。

assistant: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
Schema: CREATE TABLE SECTION (semester VARCHAR, YEAR VARCHAR)
user: 每学期和一年提供多少课程？

assistant: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
Schema: CREATE TABLE SECTION (YEAR VARCHAR)
user: 找出课程数量最多的一年。

assistant: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE SECTION (YEAR VARCHAR)
user: 哪一年课程最多？

assistant: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE SECTION (semester VARCHAR, YEAR VARCHAR)
user: 找到课程数量最多的年度和学期。

assistant: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE SECTION (semester VARCHAR, YEAR VARCHAR)
user: 最多的课程年度和学期是什么？

assistant: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE student (dept_name VARCHAR)
user: 查找学生数量最多的院系名称？

assistant: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE student (dept_name VARCHAR)
user: 招生最多的院系名字是什么？

assistant: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE student (dept_name VARCHAR)
user: 找到每个院系的学生总数。

assistant: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
Schema: CREATE TABLE student (dept_name VARCHAR)
user: 每个院系有多少学生？

assistant: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
Schema: CREATE TABLE takes (semester VARCHAR, YEAR VARCHAR)
user: 找出上课学生人数最少的学期和年份。

assistant: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE takes (semester VARCHAR, YEAR VARCHAR)
user: 哪个学期和年份的学生最少？

assistant: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
Schema: CREATE TABLE advisor (s_id VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 指导“历史”系所有学生的教师的ID是什么？

assistant: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  '历史'
Schema: CREATE TABLE advisor (s_id VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 给指导“历史”系的学生的老师的ID。

assistant: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  '历史'
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR, salary VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 请问“历史”系导师的姓名和薪水？

assistant: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '历史'
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR, salary VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 给“历史”系学生提供指导的教师的姓名和薪水是多少？

assistant: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '历史'
Schema: CREATE TABLE course (course_id VARCHAR), CREATE TABLE prereq (course_id VARCHAR)
user: 找到没有任何预备课程的课程的ID？

assistant: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
Schema: CREATE TABLE course (course_id VARCHAR), CREATE TABLE prereq (course_id VARCHAR)
user: 没有预备课程的课程的ID是什么？

assistant: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: “国际金融"课程的预备课程的名称是什么？

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  '国际金融')
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 给我“国际金融”课程的预备课程。

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  '国际金融')
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 找到预备课程是微分几何的课程名称。

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id  =  T2.course_id WHERE T2.title  =  '微分几何')
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 以微分几何为预备课程的课程名称是什么？

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id  =  T2.course_id WHERE T2.title  =  '微分几何')
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR, semester VARCHAR, YEAR VARCHAR), CREATE TABLE takes (id VARCHAR, name VARCHAR, semester VARCHAR, YEAR VARCHAR)
user: 查找在2003年秋季学期上过任何课程的学生的姓名。

assistant: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  '秋季' AND YEAR  =  2003)
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR, semester VARCHAR, YEAR VARCHAR), CREATE TABLE takes (id VARCHAR, name VARCHAR, semester VARCHAR, YEAR VARCHAR)
user: 2003秋季选修过课程的学生的姓名是什么？

assistant: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  '秋季' AND YEAR  =  2003)
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE SECTION (course_id VARCHAR)
user: 在2010年秋季学期，“智远楼”建筑学院提供的课程名称是什么？

assistant: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  '智远楼' AND semester  =  '秋季' AND YEAR  =  2010
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE SECTION (course_id VARCHAR)
user: 请给出2010秋季“智远楼”里提供课程的名称。

assistant: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  '智远楼' AND semester  =  '秋季' AND YEAR  =  2010
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE teaches (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR)
user: 找到以前教“C编程”课程的老师的名字。

assistant: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id  =  T2.id JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T3.title  =  'C语言'
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE teaches (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR)
user: 教过“C编程”课程的老师的名字是什么？

assistant: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id  =  T2.id JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T3.title  =  'C语言'
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR, salary VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 查找“数学”系学生的导师的姓名和薪水。

assistant: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '数学'
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR, salary VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR)
user: 给“数学”系的学生提供指导的老师的姓名和薪水是多少？

assistant: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '数学'
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR, tot_cred VARCHAR)
user: 根据学生的总学分对结果进行排序，查找“数学”系学生的导师姓名。

assistant: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '数学' ORDER BY T3.tot_cred
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR, tot_cred VARCHAR)
user: 按学生学分总数排序，“数学”系学生的所有指导老师的姓名是什么？

assistant: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  '数学' ORDER BY T3.tot_cred
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 什么是“移动计算”的预备课程？

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  '移动计算')
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: “移动计算”的预备课程是什么？

assistant: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  '移动计算')
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE student (id VARCHAR, tot_cred VARCHAR)
user: 找出总学分数最高的学生的导师姓名。

assistant: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id ORDER BY T3.tot_cred DESC LIMIT 1
Schema: CREATE TABLE advisor (s_id VARCHAR, i_id VARCHAR), CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE student (id VARCHAR, tot_cred VARCHAR)
user: 总学分最多的学生的指导老师叫什么名字？

assistant: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id ORDER BY T3.tot_cred DESC LIMIT 1
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE teaches (id VARCHAR, name VARCHAR)
user: 找到没有教授任何课程的老师的名字？

assistant: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR), CREATE TABLE teaches (id VARCHAR, name VARCHAR)
user: 没有教书的老师的名字是什么？

assistant: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
Schema: CREATE TABLE instructor (id VARCHAR), CREATE TABLE teaches (id VARCHAR)
user: 找到没有教授任何课程的老师的ID？

assistant: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
Schema: CREATE TABLE instructor (id VARCHAR), CREATE TABLE teaches (id VARCHAR)
user: 没有教书的教师有哪些ID？

assistant: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR, semester VARCHAR), CREATE TABLE teaches (id VARCHAR, name VARCHAR, semester VARCHAR)
user: 找出那些“春季”学期没有上过任何课程的老师的名字。

assistant: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  '春季')
Schema: CREATE TABLE instructor (id VARCHAR, name VARCHAR, semester VARCHAR), CREATE TABLE teaches (id VARCHAR, name VARCHAR, semester VARCHAR)
user: 在“春季”没有授课的老师的名字是什么？

assistant: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  '春季')
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
user: 找出教授平均工资最高的系名。

assistant: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER)
user: 哪个系的讲师平均工资最高？

assistant: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER), CREATE TABLE department (dept_name VARCHAR, budget VARCHAR)
user: 找出预算最高的系所有讲师的人数和平均工资。

assistant: SELECT avg(T1.salary) ,  count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name  =  T2.dept_name ORDER BY T2.budget DESC LIMIT 1
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER), CREATE TABLE department (dept_name VARCHAR, budget VARCHAR)
user: 预算最高的系里有多少名讲师，他们的平均工资是多少？

assistant: SELECT avg(T1.salary) ,  count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name  =  T2.dept_name ORDER BY T2.budget DESC LIMIT 1
Schema: CREATE TABLE classroom (capacity INTEGER), CREATE TABLE SECTION (course_id VARCHAR, building VARCHAR, room_number VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR, credits VARCHAR)
user: 在最大的教室(容量最高)教的课程名称和学分是什么？

assistant: SELECT T3.title ,  T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building  =  T2.building AND T1.room_number  =  T2.room_number JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T1.capacity  =  (SELECT max(capacity) FROM classroom)
Schema: CREATE TABLE classroom (capacity INTEGER), CREATE TABLE SECTION (course_id VARCHAR, building VARCHAR, room_number VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR, credits VARCHAR)
user: 给出在最大容量的课堂上教的课程的名称和学分。

assistant: SELECT T3.title ,  T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building  =  T2.building AND T1.room_number  =  T2.room_number JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T1.capacity  =  (SELECT max(capacity) FROM classroom)
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)
user: 查找没有选修“生物”系课程的学生的名字。

assistant: SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.dept_name  =  '生物学')
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)
user: 那些没有上过“生物”系课程的学生的名字是什么？

assistant: SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.dept_name  =  '生物学')
Schema: CREATE TABLE department (dept_name VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR), CREATE TABLE instructor (dept_name VARCHAR, id VARCHAR)
user: 找出每个系的学生总数和教师总数。

assistant: SELECT count(DISTINCT T2.id) ,  count(DISTINCT T3.id) ,  T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name  =  T2.dept_name JOIN instructor AS T3 ON T1.dept_name  =  T3.dept_name GROUP BY T3.dept_name
Schema: CREATE TABLE department (dept_name VARCHAR), CREATE TABLE student (dept_name VARCHAR, id VARCHAR), CREATE TABLE instructor (dept_name VARCHAR, id VARCHAR)
user: 每个系有多少学生和老师？

assistant: SELECT count(DISTINCT T2.id) ,  count(DISTINCT T3.id) ,  T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name  =  T2.dept_name JOIN instructor AS T3 ON T1.dept_name  =  T3.dept_name GROUP BY T3.dept_name
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 查找已经选修了“国际金融”的预备课程的学生的姓名。

assistant: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  '国际金融')
Schema: CREATE TABLE student (id VARCHAR, name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE course (course_id VARCHAR, title VARCHAR), CREATE TABLE prereq (course_id VARCHAR, prereq_id VARCHAR)
user: 学过“国际金融”这门课程的预备课程的学生的名字是什么？

assistant: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  '国际金融')
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER, name VARCHAR)
user: 查找工资低于“物理”系讲师平均工资的讲师的姓名和薪水。

assistant: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  '屋里')
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER, name VARCHAR)
user: 低于“物理”系讲师的平均工资的讲师的姓名和薪水是多少？

assistant: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  '屋里')
Schema: CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE student (id VARCHAR, name VARCHAR)
user: 查找“统计学”系提供的课程名称。

assistant: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  '统计学'
Schema: CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR), CREATE TABLE takes (course_id VARCHAR, id VARCHAR), CREATE TABLE student (id VARCHAR, name VARCHAR)
user: 学习“统计学”学课程的学生的名字是什么？

assistant: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  '统计学'
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR, dept_name VARCHAR), CREATE TABLE SECTION (course_id VARCHAR, year VARCHAR, building VARCHAR, room_number VARCHAR, semester VARCHAR)
user: 查找由“心理学”系按课程名称分类的所有课程的大楼、房间号码、学期和年份。

assistant: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  '心理学' ORDER BY T1.title
Schema: CREATE TABLE course (course_id VARCHAR, title VARCHAR, dept_name VARCHAR), CREATE TABLE SECTION (course_id VARCHAR, year VARCHAR, building VARCHAR, room_number VARCHAR, semester VARCHAR)
user: 按课程名称排序，“心理学”系的课程的建筑、房间号码、学期和年份是什么？

assistant: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  '心理学' ORDER BY T1.title
Schema: CREATE TABLE instructor (dept_name VARCHAR, name VARCHAR)
user: 查找“计算机”系所有讲师姓名。

assistant: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'
Schema: CREATE TABLE instructor (dept_name VARCHAR, name VARCHAR)
user: “计算机”系中所有教员的名字是什么？

assistant: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER, name VARCHAR)
user: 查找“计算机”系所有工资大于80000的所有讲师姓名。

assistant: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'  AND salary  >  80000
Schema: CREATE TABLE instructor (dept_name VARCHAR, salary INTEGER, name VARCHAR)
user: “计算机”系收入高于80000的教员名字是什么？

assistant: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'  AND salary  >  80000
Schema: CREATE TABLE instructor (ID VARCHAR), CREATE TABLE teaches (ID VARCHAR)
user: 找出教过一些课程的老师的名字和课程ID。

assistant: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Schema: CREATE TABLE instructor (ID VARCHAR), CREATE TABLE teaches (ID VARCHAR)
user: 所有教过课程的老师的姓名以及相应的课程ID？

assistant: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Schema: CREATE TABLE instructor (dept_name VARCHAR, ID VARCHAR), CREATE TABLE teaches (ID VARCHAR)
user: 查找所有教过某些课程的“艺术”系讲师的姓名和所讲授的课程id。

assistant: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  '艺术'
Schema: CREATE TABLE instructor (dept_name VARCHAR, ID VARCHAR), CREATE TABLE teaches (ID VARCHAR)
user: 教过一门课的“艺术”系讲师的姓名，以及相应的课程编号？

assistant: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  '艺术'
Schema: CREATE TABLE instructor (name VARCHAR)
user: 找出姓名中含有“明”的所有讲师的姓名。

assistant: SELECT name FROM instructor WHERE name LIKE '明'
Schema: CREATE TABLE instructor (name VARCHAR)
user: 含有“明”名字的所有讲师的名字是什么？

assistant: SELECT name FROM instructor WHERE name LIKE '明'
Schema: CREATE TABLE instructor (name VARCHAR)
user: 按字母顺序列出所有不同讲师的姓名。

assistant: SELECT DISTINCT name FROM  instructor ORDER BY name
Schema: CREATE TABLE instructor (name VARCHAR)
user: 列出教员的不同姓名，按姓名顺序排列。

assistant: SELECT DISTINCT name FROM  instructor ORDER BY name
Schema: CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
user: 查找2009“秋季”或2010“春季”课程。

assistant: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
Schema: CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
user: 2009“秋季”或2010“春季”课程的ID是什么？

assistant: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
Schema: CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
user: 查找2009“秋季”和2010“春季”课程。

assistant: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010