jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 这个姓“李”的学生修了多少学分的课程，课程描述是什么？

SQL: SELECT T4.crs_description ,  T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num JOIN course AS T4 ON T4.crs_code  =  T1.crs_code WHERE T3.stu_lname  =  '李'
问题: 有“博士”或“硕士”学位的教授有多少？

SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  '博士' OR prof_high_degree  =  '硕士'
问题: 有多少教授获得“博士”学位或“硕士”学位？

SQL: SELECT count(*) FROM professor WHERE prof_high_degree  =  '博士' OR prof_high_degree  =  '硕士'
问题: 来自“会计学”或“生物学”系的教授有多少？

SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T2.dept_name  =  '会计学' OR T2.dept_name  =  '生物学'
问题: “会计学”或“生物学”系的教授人数是多少？

SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T2.dept_name  =  '会计学' OR T2.dept_name  =  '生物学'
问题: 找到正在教代码是“哲学”和“文学”的这两门课程的教授的名字。

SQL: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  '哲学' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  '文学'
问题: 正在教“哲学”和“QM261”的教授的名字是什么？

SQL: SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  '哲学' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  '文学'
问题: 查找正在上“会计学”和“信息系统”系的课程的学生的名字。

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  '会计学' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  '信息系统'
问题: 参加“会计学”和“信息系统”系课程的所有学生的名字是什么？

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  '会计学' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code JOIN department AS T5 ON T5.dept_code  =  T4.dept_code WHERE T5.dept_name  =  '信息系统'
问题: 课程编号为“美术”的学生的平均gpa是多少？

SQL: SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T1.class_code  =  T3.class_code WHERE T3.crs_code  =  '美术'
问题: 上“ACT211”课程的学生的平均GPA是多少？

SQL: SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T1.class_code  =  T3.class_code WHERE T3.crs_code  =  '美术'
问题: gpa排名前5位的学生的名字、gpa和电话号码是多少？

SQL: SELECT stu_gpa ,  stu_phone ,  stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
问题: 成绩前5名的学生的名字、平均成绩和电话号码是多少？

SQL: SELECT stu_gpa ,  stu_phone ,  stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
问题: GPA最低的学生的院系名称是什么？

SQL: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1
问题: 成绩最低的学生的系名是什么？

SQL: SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1
问题: 找出gpa低于所有学生平均gpa的学生的名字和gpa。

SQL: SELECT stu_fname ,  stu_gpa FROM student WHERE stu_gpa  <  (SELECT avg(stu_gpa) FROM student)
问题: 每个GPA低于平均水平的学生的名字和GPA是多少？

SQL: SELECT stu_fname ,  stu_gpa FROM student WHERE stu_gpa  <  (SELECT avg(stu_gpa) FROM student)
问题: 找出学生人数最多的系的名称和地址。

SQL: SELECT T2.dept_name ,  T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1
问题: 学生最多的系的名称和地址是什么？

SQL: SELECT T2.dept_name ,  T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1
问题: 查找学生人数前3名的系里的学生的姓名、地址和学生人数。

SQL: SELECT T2.dept_name ,  T2.dept_address ,  count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3
问题: 学生最多的3个系的学生姓名、地址和人数是多少？

SQL: SELECT T2.dept_name ,  T2.dept_address ,  count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3
问题: 找到历史系有“博士”学位的教授的名字和办公室。

SQL: SELECT T1.emp_fname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T3.dept_code  =  T2.dept_code WHERE T3.dept_name  =  '旧' AND T2.prof_high_degree  =  '博士'
问题: 历史系有“博士”学位的教授的名字和职务是什么？

SQL: SELECT T1.emp_fname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T3.dept_code  =  T2.dept_code WHERE T3.dept_name  =  '旧' AND T2.prof_high_degree  =  '博士'
问题: 找出所有教过某些课程的老师的名字和课程代码。

SQL: SELECT T2.emp_fname ,  T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num
问题: 教过课的所有老师的姓名和相应的课程代码是什么？

SQL: SELECT T2.emp_fname ,  T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num
问题: 找出所有教过某些课程的老师的名字和课程描述。

SQL: SELECT T2.emp_fname ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code
问题: 所有教过课程的老师的姓名是什么，相应的课程描述是什么？

SQL: SELECT T2.emp_fname ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code
问题: 找出所有教过某门课的教师的姓名和办公室，并找到课程描述。

SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num
问题: 教过某些课程的所有讲师的名字和办公地点是什么？

SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num
问题: 找到所有教过某些课程的讲师的名字和办公室以及课程描述和院系名称。

SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code
问题: 所有讲师的姓名、办公地点和院系是什么，以及他们讲授的课程的描述是什么？

SQL: SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code
问题: 找出上过课的所有学生的姓名以及课程描述。

SQL: SELECT T1.stu_fname ,  T1.stu_lname ,  T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code
问题: 上过课的所有学生的名字和相应的课程描述是什么？

SQL: SELECT T1.stu_fname ,  T1.stu_lname ,  T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code
问题: 查找所有上过课而且成绩是“A”或者“C”的学生的名字。

SQL: SELECT T1.stu_fname ,  T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'C' OR T2.enroll_grade  =  'A'
问题: 所有拿到课程成绩是“A”或“C”的学生的名字是什么？

SQL: SELECT T1.stu_fname ,  T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'C' OR T2.enroll_grade  =  'A'
问题: 查找“会计学”系所有上课的教授的名字和教室。

SQL: SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  '会计学'
问题: 所有“会计学”系上课的教授的姓氏是什么？他们上的课程的教室是什么？

SQL: SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  '会计学'
问题: 查找“信息系统”系所有上课的教授的姓名和学位。

SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  '信息系统'
问题: “信息系统”系任教的教授的不同的名字和所获得的最高学位是什么？

SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  '信息系统'
问题: 在代码为10018的课上获得成绩为“A”的学生的姓氏是什么？

SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
问题: 在代码为10018的课上拿到“A”的学生姓什么？

SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
问题: 找到没有拿到“博士”学位的“旧”系教授的名字和办公室。

SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  '旧' AND T1.prof_high_degree != '博士'
问题: 没有“博士”学位的“历史"系教授的名字和办公室是什么？

SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  '旧' AND T1.prof_high_degree != '博士'
问题: 找出教一门课的教授的名字。

SQL: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num GROUP BY T1.prof_num HAVING count(*)  >  1
问题: 所有教至少一门课的教授的名字是什么？

SQL: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num GROUP BY T1.prof_num HAVING count(*)  >  1
问题: 找到只上一门课的学生的名字。

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num GROUP BY T2.stu_num HAVING count(*)  =  1
问题: 只有一门课的学生的名字是什么？

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num GROUP BY T2.stu_num HAVING count(*)  =  1
问题: 找到描述包含“统计”一词的课程所属的院系。

SQL: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '统计'
问题: 提供包含“统计”一词的描述课程的系名是什么？

SQL: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '统计'
问题: 姓氏以字母“少”开头而且正在上“美术”课的学生的名字是什么？

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  '美术' AND T1.stu_lname LIKE '少'
问题: 姓氏以字母“少”开头，正在上“美术”的学生的名字是什么？

SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  '美术' AND T1.stu_lname LIKE '少'
问题: 有多少个俱乐部？

SQL: SELECT count(*) FROM club
问题: 俱乐部的总数是多少？

SQL: SELECT count(*) FROM club
问题: 按字母升序顺序列出俱乐部的不同区域。

SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
问题: 俱乐部按字母顺序排列的不同区域是什么？

SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
问题: 俱乐部的平均金牌数是多少？

SQL: SELECT avg(Gold) FROM club_rank
问题: 一个俱乐部的平均金牌数是多少？

SQL: SELECT avg(Gold) FROM club_rank
问题: 比赛的类型和国家是什么？

SQL: SELECT Competition_type ,  Country FROM competition
问题: 每一种比赛的类型和所在的国家是什么？

SQL: SELECT Competition_type ,  Country FROM competition
问题: 比赛类型不是“锦标赛”的不同年份是什么？

SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "锦标赛"
问题: 比赛类型不是“锦标赛”的所有比赛的不同的年份有哪些？

SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "锦标赛"
问题: 俱乐部银牌的最大和最小数量是多少？

SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
问题: 所有俱乐部的银牌的最大和最小数量是多少？

SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
问题: 有多少俱乐部总奖牌数不到10？

SQL: SELECT count(*) FROM club_rank WHERE Total  <  10
问题: 总共有少于10枚奖牌的俱乐部总数是多少？

SQL: SELECT count(*) FROM club_rank WHERE Total  <  10
问题: 按开始年份升序，列出所有俱乐部名称。

SQL: SELECT name FROM club ORDER BY Start_year ASC
问题: 从最古老的俱乐部开始，所有俱乐部的名字是什么？

SQL: SELECT name FROM club ORDER BY Start_year ASC
问题: 按字母顺序降序，列出所有俱乐部名称。

SQL: SELECT name FROM club ORDER BY name DESC
问题: 所有俱乐部按字母顺序降序排列的名字是什么？

SQL: SELECT name FROM club ORDER BY name DESC
问题: 请显示俱乐部的名字和球员。

SQL: SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
问题: 所有俱乐部的名字和球员是什么？

SQL: SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
问题: 显示位置包含“右前锋”的球员的俱乐部名字。

SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "右前锋"
问题: 位置包括“右前锋”的球员的俱乐部叫什么名字？

SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "右前锋"
问题: “国安”俱乐部的球员平均得分是多少？

SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "国安"
问题: “国安”俱乐部的球员平均有多少得分？

SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "国安"
问题: 列出球员的位置和每个位置球员的平均得分数。

SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
问题: 对于每个位置，球员在那个位置的平均得分是多少？

SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
问题: 列出平均得分数大于20分的球员的位置。

SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
问题: 那些平均得分高于20分的球员的位置是什么？

SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
问题: 列出比赛的类型和每种类型比赛的数目。

SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
问题: 比赛的类型有哪些？每种类型的比赛的数量是多少？

SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
问题: 列出最常见的比赛类型。

SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
问题: 最常见的比赛类型是什么？

SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出最多有五场比赛的比赛类型。

SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5
问题: 最多有5场比赛的比赛类型是什么？

SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5
问题: 列出没有球员的俱乐部的名字。

SQL: SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
问题: 所有没有球员的俱乐部的名字是什么？

SQL: SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
问题: 哪些位置既有得分都超过20分的球员又有得分低于10分的球员？

SQL: SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10
问题: 哪些位置既有得分超过20又有得分低于10的球员 ？

SQL: SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10
问题: 显示所有球员的总点数。

SQL: SELECT sum(Points) FROM player
问题: 所有球员的总点数是多少？

SQL: SELECT sum(Points) FROM player
问题: 有多少个不同的位置？

SQL: SELECT count(DISTINCT POSITION) FROM player
问题: 球员有多少种不同的位置？

SQL: SELECT count(DISTINCT POSITION) FROM player
问题: 得分高于平均得分的球员的名字是什么？

SQL: SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)
问题: 所有得分高于平均分数的球员的名字是什么？

SQL: SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)
问题: 找出每个位置得分低于30的球员的数量。

SQL: SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION
问题: 每个位置的得分少于30的球员的数量是多少？

SQL: SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION
问题: 哪个国家参加过最多的比赛？

SQL: SELECT country FROM competition WHERE competition_type  =  '锦标赛' GROUP BY country ORDER BY count(*) DESC LIMIT 1
问题: 参加过最多的“锦标赛”的国家叫什么名字？

SQL: SELECT country FROM competition WHERE competition_type  =  '锦标赛' GROUP BY country ORDER BY count(*) DESC LIMIT 1
问题: 哪些国家参加了“友谊型”和“锦标赛”类型的比赛？

SQL: SELECT country FROM competition WHERE competition_type  =  '友谊型' INTERSECT SELECT country FROM competition WHERE competition_type  =  '锦标赛'
问题: 哪些国家既参加了“友谊型”又参加了“锦标赛”？

SQL: SELECT country FROM competition WHERE competition_type  =  '友谊型' INTERSECT SELECT country FROM competition WHERE competition_type  =  '锦标赛'
问题: 找到那些从未参加过任何“友谊型”的国家。

SQL: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  '友谊型'
问题: 哪些国家从未参加过“友谊型”？

SQL: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  '友谊型'
问题: 总共有多少家具部件？

SQL: SELECT sum(num_of_component) FROM furniture
问题: 以最高的市场价格返回家具的名称和ID。

SQL: SELECT name ,  furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
问题: 找到市场份额前2的家具的总市场价格。

SQL: SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
问题: 查找有超过10个组件的所有家具的组件数量和名称。

SQL: SELECT Num_of_Component ,  name FROM furniture WHERE Num_of_Component  >  10
问题: 找出最不受欢迎的家具的名称和部件数量。

SQL: SELECT name ,  Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
问题: 查找价格低于最高价格的家具名称。

SQL: SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID WHERE t2.Price_in_Dollar  <  (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
问题: 哪个制造商的商店最多？列出其名称和开业年份。

SQL: SELECT open_year ,  name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
问题: 找出拥有超过20个商店的制造商的平均工厂数量。

SQL: SELECT avg(Num_of_Factories) FROM manufacturer WHERE num_of_shops  >  20
问题: 列出其开张年度所订购的所有制造商名称和ID。

SQL: SELECT name ,  manufacturer_id FROM manufacturer ORDER BY open_year
问题: 请告诉我工厂少于10家或商店多于10家的制造商的名称和开业年份。

SQL: SELECT name ,  open_year FROM manufacturer WHERE num_of_shops  >  10 OR Num_of_Factories  <  10
问题: 工厂的平均数量和1990年前开业的制造商的最大商店数量是多少？

SQL: SELECT max(num_of_shops) ,  avg(Num_of_Factories) FROM manufacturer WHERE open_year  <  1990
问题: 查找生产最贵家具的公司的id和商店的数量。

SQL: SELECT t1.manufacturer_id ,  t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
问题: 查找每个制造商生产的产品类型以及公司名称。

SQL: SELECT count(*) ,  t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id GROUP BY t1.manufacturer_id
问题: 请告诉我一些公司制造的家具的名称和价格。

SQL: SELECT t1.name ,  t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID
问题: 查找我们的记录里没有公司正在生产的家具的市场份额和名称。

SQL: SELECT Market_Rate ,  name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
问题: 请查找生产的家具的部件小于6和多于10的公司的名称。

SQL: SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  <  6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  >  10
问题: 显示每个雇员的名字和部门名称。

SQL: SELECT T1.first_name ,  T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id
问题: 所有员工的名字和部门名称是什么？

SQL: SELECT T1.first_name ,  T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id
问题: 列出那些收入低于6000的员工的全名（名字和姓氏）以及薪水。

SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000
问题: 对于少于6000岁的员工，他们的全名和薪水是多少？

SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000
问题: 显示姓氏为“何”的所有员工的姓氏和部门号码。

SQL: SELECT first_name ,  department_id FROM employees WHERE last_name  =  '何'
问题: 姓“何”的员工的姓氏和部门号码是什么？

SQL: SELECT first_name ,  department_id FROM employees WHERE last_name  =  '何'
问题: 返回所有没有任何部门号码的员工的所有信息。

SQL: SELECT * FROM employees WHERE department_id  =  "空"
问题: 没有部门编号的员工是什么？

SQL: SELECT * FROM employees WHERE department_id  =  "空"
问题: 显示“市场”部的所有信息。

SQL: SELECT * FROM  departments WHERE department_name  =  '市场'
问题: “市场”部的所有信息是什么？

SQL: SELECT * FROM  departments WHERE department_name  =  '市场'
问题: 那些名字不包含“男”字的雇员的雇佣日期是什么时候？

SQL: SELECT hire_date FROM employees WHERE first_name NOT LIKE '男'
问题: 名字里没有“男”字的雇员是在什么日期被雇用的？

SQL: SELECT hire_date FROM employees WHERE first_name NOT LIKE '男'
问题: 显示名字不包含“男”字的雇员的全名（名字和姓氏）、雇用日期、工资和部门号码。

SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '男'
问题: 名字中没有“男”字的员工的全名、聘用日期、薪水和部门ID是什么？

SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '男'
问题: 显示名字不包含“男”字的雇员的全名（姓氏和名字）、雇用日期、工资和部门编号，并将结果按部门编号升序排列。

SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '男' ORDER BY department_id
问题: 名字中没有“男”字的员工的全名、雇佣数据、工资和部门ID是什么？

SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '男' ORDER BY department_id
问题: 工资在8000和120000范围内的雇员的电话号码是多少？

SQL: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
问题: 返回工资在8000到12000之间的雇员的电话号码。

SQL: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
问题: 显示工资在8000到12000范围内且佣金不为“空”或部门编号不等于40的员工的所有信息。

SQL: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "空" OR  department_id != 40
问题: 返回所有有关工资在8000至12000之间而且佣金不为“空”，或者部门ID不为40的员工的信息。

SQL: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "空" OR  department_id != 40
问题: 对于那些没有任何佣金的员工，他们的全名（名字和姓氏）和薪水是多少？

SQL: SELECT first_name ,  last_name ,  salary FROM  employees WHERE commission_pct  =  "空"
问题: 返回佣金为“空”的雇员的全名和工资。

SQL: SELECT first_name ,  last_name ,  salary FROM  employees WHERE commission_pct  =  "空"
问题: 显示名字以字母“明”结尾的雇员的名字和姓氏，以及工资。

SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE first_name LIKE '明'
问题: 返回名字以字母“明”结尾的员工的全名和薪水。

SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE first_name LIKE '明'
问题: 找到在“2007-11-05”和“2009-07-05”之间被雇佣的员工的职位id和雇佣日期。

SQL: SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
问题: “2009-07-05”以后和“2009-07-05”之前雇佣的雇员的职位id和雇佣日期是什么？

SQL: SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
问题: 在70或90部门工作的员工的名字和姓是什么？

SQL: SELECT first_name ,  last_name FROM employees WHERE department_id  =  70 OR department_id  =  90
问题: 在部门70或90的员工的全名是什么？

SQL: SELECT first_name ,  last_name FROM employees WHERE department_id  =  70 OR department_id  =  90
问题: 找到那些在经理手下工作的员工的薪水和经理号码。

SQL: SELECT salary ,  manager_id FROM employees WHERE manager_id != "空"
问题: 有经理的员工的工资和经理id是什么？

SQL: SELECT salary ,  manager_id FROM employees WHERE manager_id != "空"
问题: 显示员工表中在“2002-06-21”之前雇佣的员工的所有细节。

SQL: SELECT * FROM employees WHERE hire_date  <  '2002-06-21'
问题: “2002-06-21”之前雇用的员工的信息是什么？

SQL: SELECT * FROM employees WHERE hire_date  <  '2002-06-21'
问题: 显示所有名字中包含“安”字或“文”的所有员工的所有信息，并将结果按工资降序排列。

SQL: SELECT * FROM employees WHERE first_name LIKE '安' OR first_name LIKE 'S' ORDER BY salary DESC
问题: 按工资递减顺序排列，名字中包含“安”或“文”的员工有哪些信息？

SQL: SELECT * FROM employees WHERE first_name LIKE '安' OR first_name LIKE 'S' ORDER BY salary DESC
问题: 显示“1987-09-07”后加入的员工。

SQL: SELECT * FROM employees WHERE hire_date  >  '1987-09-07'
问题: “1987-09-07”以后雇佣了哪些员工？

SQL: SELECT * FROM employees WHERE hire_date  >  '1987-09-07'
问题: 显示最低工资大于9000的职位名称。

SQL: SELECT job_title FROM jobs WHERE min_salary  >  9000
问题: 哪些职位对应的薪水超过9000？

SQL: SELECT job_title FROM jobs WHERE min_salary  >  9000
问题: 显示最高工资在1200至1800范围内的职位名称和最低和最高工资之间的差额。

SQL: SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
问题: 最高工资在12000至1800之间的工作名称，以及工资范围是什么？

SQL: SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
问题: 显示那些没有佣金百分比而且薪水在7000-12000范围内并且工作于50号部门的员工的电子邮件。

SQL: SELECT email FROM employees WHERE commission_pct  =  "空" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
问题: 那些没有佣金，工资在7000到120000之间，而且在部门50工作的员工的电子邮件是什么？

SQL: SELECT email FROM employees WHERE commission_pct  =  "空" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
问题: 显示每个雇员的雇员ID和他结束前一份工作的日期。

SQL: SELECT employee_id ,  MAX(end_date) FROM job_history GROUP BY employee_id