jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 找到预算最高的部门的名称和建筑。

SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC LIMIT 1
问题: 预算最大的部门的部门名称和相应的建筑是什么？

SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC LIMIT 1
问题: “历史”系总学分最高的学生叫什么名字？

SQL: SELECT name FROM student WHERE dept_name  =  '历史' ORDER BY tot_cred DESC LIMIT 1
问题: 给出最高学分的“历史”系学生的名字。

SQL: SELECT name FROM student WHERE dept_name  =  '历史' ORDER BY tot_cred DESC LIMIT 1
问题: “教学”大楼有多少个房间？

SQL: SELECT count(*) FROM classroom WHERE building  =  '教学'
问题: 统计一下“教学”的教室数量。

SQL: SELECT count(*) FROM classroom WHERE building  =  '教学'
问题: 有多少学生有顾问？

SQL: SELECT count(DISTINCT s_id) FROM advisor
问题: 统计有顾问的学生人数。

SQL: SELECT count(DISTINCT s_id) FROM advisor
问题: 有多少院系提供课程？

SQL: SELECT count(DISTINCT dept_name) FROM course
问题: 统计提供课程的院系的数量。

SQL: SELECT count(DISTINCT dept_name) FROM course
问题: “物理”系开设了多少门不同课程？

SQL: SELECT count(DISTINCT course_id) FROM course WHERE dept_name  =  '屋里'
问题: 计算“物理”系的课程数。

SQL: SELECT count(DISTINCT course_id) FROM course WHERE dept_name  =  '屋里'
问题: 找到有两个预备课程的课程标题？

SQL: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  =  2
问题: 有两个预备课程的课程名称是什么？

SQL: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  =  2
问题: 找到具有两个预备课程的课程的名称、学分和系名？

SQL: SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1
问题: 有多于一个预备课程的课程的名称、学分值和系名是什么？

SQL: SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1
问题: 有多少课程没有预备课程？

SQL: SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
问题: 计算无预备课程的课程数量。

SQL: SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
问题: 找到没有任何预备课程的课程名称？

SQL: SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
问题: 没有预备课程的课程名称是什么？

SQL: SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
问题: 有多少不同的老师教过一些课程？

SQL: SELECT COUNT (DISTINCT id) FROM teaches
问题: 统计教授课程的不同教员的数量。

SQL: SELECT COUNT (DISTINCT id) FROM teaches
问题: 找到“市场”或“财务”部门的总预算。

SQL: SELECT sum(budget) FROM department WHERE dept_name  =  '管理' OR dept_name  =  '金融'
问题: “市场”或“财务”部门预算的总和是多少？

SQL: SELECT sum(budget) FROM department WHERE dept_name  =  '管理' OR dept_name  =  '金融'
问题: 找到名字包含“成庆”的教员的院系名称。

SQL: SELECT dept_name FROM instructor WHERE name LIKE '成庆'
问题: 教员姓名包含“成庆”的部门叫什么？

SQL: SELECT dept_name FROM instructor WHERE name LIKE '成庆'
问题: “教学”大厦有多少房间容量小于50？

SQL: SELECT count(*) FROM classroom WHERE building  =  '教学' AND capacity  <  50
问题: 统计“教学”的容量低于50房间的数量。

SQL: SELECT count(*) FROM classroom WHERE building  =  '教学' AND capacity  <  50
问题: 找出预算高于平均预算的部门的名称和预算。

SQL: SELECT dept_name ,  budget FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
问题: 预算大于平均的部门的名称和预算是什么？

SQL: SELECT dept_name ,  budget FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
问题: “统计学”系工资最低的教师叫什么名字？

SQL: SELECT name FROM instructor WHERE dept_name  =  '统计学' ORDER BY salary LIMIT 1
问题: 给出“统计”系最低收入的导师的名字。

SQL: SELECT name FROM instructor WHERE dept_name  =  '统计学' ORDER BY salary LIMIT 1
问题: 找到由“统计学”和“心理学”系共同提供的课程名称。

SQL: SELECT title FROM course WHERE dept_name  =  '统计学' INTERSECT SELECT title FROM course WHERE dept_name  =  '心理学'
问题: “统计”和“心理学”系都列出的课程名称是什么？

SQL: SELECT title FROM course WHERE dept_name  =  '统计学' INTERSECT SELECT title FROM course WHERE dept_name  =  '心理学'
问题: 找到由“统计学”而不是“心理学”系提供的课程名称。

SQL: SELECT title FROM course WHERE dept_name  =  '统计学' EXCEPT SELECT title FROM course WHERE dept_name  =  '心理学'
问题: 是“统计学”系而不是“心理学”系的课程名称是什么？

SQL: SELECT title FROM course WHERE dept_name  =  '统计学' EXCEPT SELECT title FROM course WHERE dept_name  =  '心理学'
问题: 查找在2009年“秋天”而不是2010年“春天”教课的老师的ID。

SQL: SELECT id FROM teaches WHERE semester  =  '秋季' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  '春季' AND YEAR  =  2010
问题: 在2009年“秋天”而不是2010年“春天”教书的老师的ID是什么？

SQL: SELECT id FROM teaches WHERE semester  =  '秋季' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  '春季' AND YEAR  =  2010
问题: 找出2009和2010年上课的学生名字。

SQL: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE YEAR  =  2009 OR YEAR  =  2010
问题: 参加2009、2010年课程的学生的名字是什么？

SQL: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE YEAR  =  2009 OR YEAR  =  2010
问题: 找出提供最大课程量的前三个院系的名称？

SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3
问题: 3个有最多课程的院系名称是什么？

SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3
问题: 找出提供最高总学分的院系的名称？

SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1
问题: 这个学分最多的院系叫什么名字？

SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1
问题: 按照他们名称和学分排序，列出所有课程的名称。

SQL: SELECT title FROM course ORDER BY title ,  credits
问题: 给出按名称和学分顺序排列的所有课程的名称。

SQL: SELECT title FROM course ORDER BY title ,  credits
问题: 哪个部门的预算最低？

SQL: SELECT dept_name FROM department ORDER BY budget LIMIT 1
问题: 给出最低预算的部门名称。

SQL: SELECT dept_name FROM department ORDER BY budget LIMIT 1
问题: 按预算从大到小列出所有部门的名称和建筑。

SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC
问题: 按预算降序排列，部门的名称和建筑是什么？

SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC
问题: 谁是最高工资的教练？

SQL: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1
问题: 给出最高薪的教员的名字。

SQL: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1
问题: 按薪水递增顺序列出所有教员的信息。

SQL: SELECT * FROM instructor ORDER BY salary
问题: 给出所有有关导师的信息，按照薪水从低到高的顺序排列。

SQL: SELECT * FROM instructor ORDER BY salary
问题: 按学分总数按升序排列学生姓名和院系名。

SQL: SELECT name ,  dept_name FROM student ORDER BY tot_cred
问题: 按学分从少到大的顺序排列的学生及其所属院系的名称是什么？

SQL: SELECT name ,  dept_name FROM student ORDER BY tot_cred
问题: 按字母顺序列出2008年所有课程名称及其老师姓名。

SQL: 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
问题: 按照名称的字母顺序，显示2008年所有课程的名称和导师的姓名。

SQL: 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
问题: 找出指导一个以上学生的老师的名字。

SQL: 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
问题: 指导一个以上学生的老师的名字是什么？

SQL: 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
问题: 找到有不止一个导师的学生的名字？

SQL: 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
问题: 有一个以上顾问的学生的名字是什么？

SQL: 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
问题: 找到每个容量超过50的建筑的房间数。

SQL: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
问题: 每栋建筑有多少房间容量超过50？

SQL: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
问题: 找出每个建筑物所有房间的最大和平均容量。

SQL: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
问题: 每个楼房的最大和平均容量是多少？

SQL: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
问题: 找到一个由不止一个院系提供的课程的标题。

SQL: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
问题: 不止一个院系提供的课程名称是什么？

SQL: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
问题: 查找不同院系提供的课程总学分。

SQL: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
问题: 每个部门总共提供多少学分？

SQL: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
问题: 找出平均工资高于所有教师平均工资的院系的最低工资。

SQL: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
问题: 平均工资高于总平均水平的院系最低工资是多少？

SQL: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
问题: 查找每学期和一年提供的课程数量。

SQL: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
问题: 每学期和一年提供多少课程？

SQL: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
问题: 找出课程数量最多的一年。

SQL: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
问题: 哪一年课程最多？

SQL: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
问题: 找到课程数量最多的年度和学期。

SQL: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
问题: 最多的课程年度和学期是什么？

SQL: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
问题: 查找学生数量最多的院系名称？

SQL: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
问题: 招生最多的院系名字是什么？

SQL: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
问题: 找到每个院系的学生总数。

SQL: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
问题: 每个院系有多少学生？

SQL: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
问题: 找出上课学生人数最少的学期和年份。

SQL: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
问题: 哪个学期和年份的学生最少？

SQL: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
问题: 指导“历史”系所有学生的教师的ID是什么？

SQL: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  '历史'
问题: 给指导“历史”系的学生的老师的ID。

SQL: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  '历史'
问题: 请问“历史”系导师的姓名和薪水？

SQL: 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  =  '历史'
问题: 给“历史”系学生提供指导的教师的姓名和薪水是多少？

SQL: 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  =  '历史'
问题: 找到没有任何预备课程的课程的ID？

SQL: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
问题: 没有预备课程的课程的ID是什么？

SQL: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
问题: “国际金融"课程的预备课程的名称是什么？

SQL: 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  =  '国际金融')
问题: 给我“国际金融”课程的预备课程。

SQL: 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  =  '国际金融')
问题: 找到预备课程是微分几何的课程名称。

SQL: 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  =  '微分几何')
问题: 以微分几何为预备课程的课程名称是什么？

SQL: 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  =  '微分几何')
问题: 查找在2003年秋季学期上过任何课程的学生的姓名。

SQL: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  '秋季' AND YEAR  =  2003)
问题: 2003秋季选修过课程的学生的姓名是什么？

SQL: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  '秋季' AND YEAR  =  2003)
问题: 在2010年秋季学期，“智远楼”建筑学院提供的课程名称是什么？

SQL: 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
问题: 请给出2010秋季“智远楼”里提供课程的名称。

SQL: 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
问题: 找到以前教“C编程”课程的老师的名字。

SQL: 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语言'
问题: 教过“C编程”课程的老师的名字是什么？

SQL: 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语言'
问题: 查找“数学”系学生的导师的姓名和薪水。

SQL: 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  =  '数学'
问题: 给“数学”系的学生提供指导的老师的姓名和薪水是多少？

SQL: 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  =  '数学'
问题: 根据学生的总学分对结果进行排序，查找“数学”系学生的导师姓名。

SQL: 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
问题: 按学生学分总数排序，“数学”系学生的所有指导老师的姓名是什么？

SQL: 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
问题: 什么是“移动计算”的预备课程？

SQL: 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  =  '移动计算')
问题: “移动计算”的预备课程是什么？

SQL: 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  =  '移动计算')
问题: 找出总学分数最高的学生的导师姓名。

SQL: 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
问题: 总学分最多的学生的指导老师叫什么名字？

SQL: 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
问题: 找到没有教授任何课程的老师的名字？

SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
问题: 没有教书的老师的名字是什么？

SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
问题: 找到没有教授任何课程的老师的ID？

SQL: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
问题: 没有教书的教师有哪些ID？

SQL: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
问题: 找出那些“春季”学期没有上过任何课程的老师的名字。

SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  '春季')
问题: 在“春季”没有授课的老师的名字是什么？

SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  '春季')
问题: 找出教授平均工资最高的系名。

SQL: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
问题: 哪个系的讲师平均工资最高？

SQL: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
问题: 找出预算最高的系所有讲师的人数和平均工资。

SQL: 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
问题: 预算最高的系里有多少名讲师，他们的平均工资是多少？

SQL: 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
问题: 在最大的教室(容量最高)教的课程名称和学分是什么？

SQL: 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)
问题: 给出在最大容量的课堂上教的课程的名称和学分。

SQL: 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)
问题: 查找没有选修“生物”系课程的学生的名字。

SQL: 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  =  '生物学')
问题: 那些没有上过“生物”系课程的学生的名字是什么？

SQL: 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  =  '生物学')
问题: 找出每个系的学生总数和教师总数。

SQL: 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
问题: 每个系有多少学生和老师？

SQL: 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
问题: 查找已经选修了“国际金融”的预备课程的学生的姓名。

SQL: 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  =  '国际金融')
问题: 学过“国际金融”这门课程的预备课程的学生的名字是什么？

SQL: 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  =  '国际金融')
问题: 查找工资低于“物理”系讲师平均工资的讲师的姓名和薪水。

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

SQL: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  '屋里')
问题: 查找“统计学”系提供的课程名称。

SQL: 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  =  '统计学'
问题: 学习“统计学”学课程的学生的名字是什么？

SQL: 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  =  '统计学'
问题: 查找由“心理学”系按课程名称分类的所有课程的大楼、房间号码、学期和年份。

SQL: 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
问题: 按课程名称排序，“心理学”系的课程的建筑、房间号码、学期和年份是什么？

SQL: 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
问题: 查找“计算机”系所有讲师姓名。

SQL: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'
问题: “计算机”系中所有教员的名字是什么？

SQL: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'
问题: 查找“计算机”系所有工资大于80000的所有讲师姓名。

SQL: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'  AND salary  >  80000
问题: “计算机”系收入高于80000的教员名字是什么？

SQL: SELECT name FROM instructor WHERE dept_name  =  '计算机科学'  AND salary  >  80000
问题: 找出教过一些课程的老师的名字和课程ID。

SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
问题: 所有教过课程的老师的姓名以及相应的课程ID？

SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
问题: 查找所有教过某些课程的“艺术”系讲师的姓名和所讲授的课程id。

SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  '艺术'
问题: 教过一门课的“艺术”系讲师的姓名，以及相应的课程编号？

SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  '艺术'
问题: 找出姓名中含有“明”的所有讲师的姓名。

SQL: SELECT name FROM instructor WHERE name LIKE '明'
问题: 含有“明”名字的所有讲师的名字是什么？

SQL: SELECT name FROM instructor WHERE name LIKE '明'
问题: 按字母顺序列出所有不同讲师的姓名。

SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
问题: 列出教员的不同姓名，按姓名顺序排列。

SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
问题: 查找2009“秋季”或2010“春季”课程。

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 2009“秋季”或2010“春季”课程的ID是什么？

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 查找2009“秋季”和2010“春季”课程。

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 2009年“秋季”和2010年“春季”都开设了哪些课程？

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 查找在2009“秋季”但不在2010“春季”的课程。

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 在2009“秋季”但不在2010的春天的课程ID是什么？

SQL: SELECT course_id FROM SECTION WHERE semester  =  '秋季' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  '春季' AND YEAR  =  2010
问题: 找出低于最高工资的所有不同教员的工资。

SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
问题: 所有工资低于最高工资的教师的不同工资是什么？

SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
问题: 查找在2010年“春季”学期教一门课程的教师总数。

SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  '春季' AND YEAR  =  2010
问题: 2010“春季”有多少授课讲师？

SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  '春季' AND YEAR  =  2010
问题: 查找平均工资超过42000的所有院系的名称和平均工资。

SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
问题: 平均工资高于42000的院系的名称和平均工资是多少？

SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
问题: 找出一些薪水高于“生物”系某些(至少一个)老师的教师名字。

SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  '生物学')
问题: 那些比“生物”系至少一个教员工资高的教员叫什么名字？

SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  '生物学')
问题: 找出工资高于“生物”系所有教员工资的所有教员的名字。

SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  '生物学')
问题: 薪水比“生物学”系任何一位教员都高的教员的名字是什么？

SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  '生物学')
问题: 有多少辩论？

SQL: SELECT count(*) FROM debate
问题: 以观众数量的升序排列，列出辩论的场馆。

SQL: SELECT Venue FROM debate ORDER BY Num_of_Audience ASC
问题: 每次辩论的日期和场馆是什么？

SQL: SELECT Date ,  Venue FROM debate
问题: 列出超过150观众人数的辩论日期

SQL: SELECT Date FROM debate WHERE Num_of_Audience  >  150
问题: 显示35岁或36岁的人的姓名。

SQL: SELECT Name FROM  people WHERE Age  =  35 OR Age  =  36
问题: 最年轻的人的党派是什么？

SQL: SELECT Party FROM people ORDER BY Age ASC LIMIT 1
问题: 显示不同党派的人以及每个政党的人数。

SQL: SELECT Party ,  COUNT(*) FROM people GROUP BY Party
问题: 显示拥有最多人的政党。

SQL: SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示不同的辩论场地

SQL: SELECT DISTINCT Venue FROM debate
问题: 显示出在赞成一面的对方的姓名、辩论的日期和地点。

SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID
问题: 显示处于否定的一面人物的姓名、辩论的日期和地点，按姓名的升序排列。

SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Negative  =  T3.People_ID ORDER BY T3.Name ASC
问题: 显示那些在辩论中持肯定态度的人的名字，参加辩论的人数超过200人。

SQL: SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID WHERE T2.Num_of_Audience  >  200
问题: 显示出参加辩论的人的姓名和他们在正面辩论的次数。

SQL: SELECT T2.Name ,  COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative  =  T2.People_ID GROUP BY T2.Name
问题: 显示那些在辩论中至少两次处于负面的人的名字。

SQL: SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative  =  T2.People_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
问题: 列出没有在辩论的正面的人的名字。

SQL: SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)
问题: 按字母顺序列出所有顾客的名字。

SQL: SELECT customer_details FROM customers ORDER BY customer_details
问题: 按字母顺序对客户姓名进行排序。

SQL: SELECT customer_details FROM customers ORDER BY customer_details
问题: 查找与客户“李帅”相关联的所有保险单类型代码。

SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "李帅"
问题: 客户“李帅”使用的保险单的类型代码是什么？

SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "李帅"
问题: 哪种保险单使用次数最多？给我保险单类型代码。

SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
问题: 查找最常用保险单的类型代码。

SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
问题: 查找超过2个客户使用的所有保险单类型。

SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
问题: 哪种类型的保险单是有多于2名客户选择的？给我保险单类型代码。

SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
问题: 查找索赔标题中支付的总金额和平均金额。

SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers
问题: 索赔标题的总金额和平均金额是多少？

SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers