jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 最短航班的号码是多少？

SQL: SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3
问题: 从“上海”起飞的航班的平均距离和平均价格是多少？

SQL: SELECT avg(distance) ,  avg(price) FROM Flight WHERE origin  =  "上海"
问题: 从“上海”起飞的所有航班的平均距离和价格是多少？

SQL: SELECT avg(distance) ,  avg(price) FROM Flight WHERE origin  =  "上海"
问题: 显示所有出发地和每个出发地的航班的数量。

SQL: SELECT origin ,  count(*) FROM Flight GROUP BY origin
问题: 对于每一个出发地，有多少航班来自那里？

SQL: SELECT origin ,  count(*) FROM Flight GROUP BY origin
问题: 显示所有目的地和飞往每个目的地的航班数。

SQL: SELECT destination ,  count(*) FROM Flight GROUP BY destination
问题: 目的地有哪些？飞往每个目的地的航班数量是多少？

SQL: SELECT destination ,  count(*) FROM Flight GROUP BY destination
问题: 哪个出发地的航班最多？

SQL: SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1
问题: 从哪里来的航班最多？

SQL: SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1
问题: 哪个目的地的航班最少？

SQL: SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1
问题: 99号航班的飞机名称是什么？

SQL: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T1.flno  =  99
问题: 99号班机叫什么名字？

SQL: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T1.flno  =  99
问题: 显示使用“空客”飞机的所有航班号。

SQL: SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T2.name  =  "空客"
问题: “空客”飞机的航班号是多少？

SQL: SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T2.name  =  "空客"
问题: 显示每架飞机的飞机名称和航班号。

SQL: SELECT T2.name ,  count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid GROUP BY T1.aid
问题: 每架飞机的名字是什么，每个飞机有多少个航班？

SQL: SELECT T2.name ,  count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid GROUP BY T1.aid
问题: 显示至少有两个航班的所有飞机的名称。

SQL: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid GROUP BY T1.aid HAVING count(*)  >= 2
问题: 至少有2个航班的所有飞机的名字是什么？

SQL: SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid GROUP BY T1.aid HAVING count(*)  >= 2
问题: 有多少员工有证书？

SQL: SELECT count(DISTINCT eid) FROM Certificate
问题: 拥有证书的不同雇员的总数是多少？

SQL: SELECT count(DISTINCT eid) FROM Certificate
问题: 显示所有没有证书的员工ID。

SQL: SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
问题: 没有证书的所有员工的ID是什么？

SQL: SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
问题: 显示“赵强”所拥有证件的所有飞机名称。

SQL: SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T1.name  =  "赵强"
问题: “赵强”有驾驶执照的所有飞机的名字是什么？

SQL: SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T1.name  =  "赵强"
问题: 显示所有拥有“波音 733-800”证书的员工姓名。

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音"
问题: 所有持有“波音”飞行证书的员工的名字是什么？

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音"
问题: 显示所有拥有“波音”和“空客”证书的员工的姓名。

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "空客"
问题: 所有能同时驾驶“波音”和“空客”的员工的名字是什么？

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "空客"
问题: 显示所有没有“波音 733-800”证书的员工的姓名。

SQL: SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音"
问题: 所有未获得驾驶“波音”认证的雇员的姓名是什么？

SQL: SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "波音"
问题: 显示最少人拥有的飞机证书名字。

SQL: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
问题: 被认证最少的飞机名称是什么？

SQL: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1
问题: 显示距离超过5000并且至少有5人拥有其证书的飞机的名称和距离。

SQL: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid WHERE T2.distance  >  5000 GROUP BY T1.aid ORDER BY count(*)  >=  5
问题: 能飞5000距离、至少5人能飞的飞机的名字和距离是多少？

SQL: SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid WHERE T2.distance  >  5000 GROUP BY T1.aid ORDER BY count(*)  >=  5
问题: 持有飞机证件最多的员工的工资和姓名是什么？

SQL: SELECT T1.name ,  T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
问题: 拥有最多飞机证件的员工的薪资和姓名是什么？

SQL: SELECT T1.name ,  T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
问题: 持有最多的距离超过5000的飞机证书的员工的工资和姓名是什么？

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.distance  >  5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
问题: 持有距离超过5000飞机证书最多的员工的工资和姓名是什么？

SQL: SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.distance  >  5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1
问题: 有多少过敏反应？

SQL: SELECT count(DISTINCT allergy) FROM Allergy_type
问题: 有多少过敏项目？

SQL: SELECT count(DISTINCT allergy) FROM Allergy_type
问题: 有多少种不同的过敏反应类型？

SQL: SELECT count(DISTINCT allergytype) FROM Allergy_type
问题: 有多少种不同的过敏反应？

SQL: SELECT count(DISTINCT allergytype) FROM Allergy_type
问题: 显示所有过敏类型。

SQL: SELECT DISTINCT allergytype FROM Allergy_type
问题: 过敏的类型有哪些？

SQL: SELECT DISTINCT allergytype FROM Allergy_type
问题: 显示所有过敏和他们的类型。

SQL: SELECT allergy ,  allergytype FROM Allergy_type
问题: 过敏和它们的类型是什么？

SQL: SELECT allergy ,  allergytype FROM Allergy_type
问题: 显示所有类型的“食物”过敏。

SQL: SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "食物"
问题: 所有不同的“食物"过敏是什么？

SQL: SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "食物"
问题: 过敏原是"猫”的过敏类型是什么？

SQL: SELECT allergytype FROM Allergy_type WHERE allergy  =  "猫"
问题: “猫”过敏是什么类型的？

SQL: SELECT allergytype FROM Allergy_type WHERE allergy  =  "猫"
问题: 有多少“动物”过敏反应？

SQL: SELECT count(*) FROM Allergy_type WHERE allergytype  =  "动物"
问题: 有多少种“动物”过敏？

SQL: SELECT count(*) FROM Allergy_type WHERE allergytype  =  "动物"
问题: 显示所有过敏类型和每种类型的数量。

SQL: SELECT allergytype ,  count(*) FROM Allergy_type GROUP BY allergytype
问题: 过敏类型有哪些？每种类型有多少种过敏反应？

SQL: SELECT allergytype ,  count(*) FROM Allergy_type GROUP BY allergytype
问题: 哪种过敏类型有最多的过敏反应？

SQL: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1
问题: 哪种过敏反应类型最常见？

SQL: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1
问题: 哪种过敏类型有最少的过敏反应？

SQL: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1
问题: 哪种过敏类型最不常见？

SQL: SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1
问题: 有多少学生？

SQL: SELECT count(*) FROM Student
问题: 学生总数是多少？

SQL: SELECT count(*) FROM Student
问题: 显示所有学生的名字和姓氏。

SQL: SELECT Fname ,  Lname FROM Student
问题: 所有学生的全名是什么？

SQL: SELECT Fname ,  Lname FROM Student
问题: 列出了多少不同的顾问？

SQL: SELECT count(DISTINCT advisor) FROM Student
问题: 有多少顾问？

SQL: SELECT count(DISTINCT advisor) FROM Student
问题: 显示所有专业。

SQL: SELECT DISTINCT Major FROM Student
问题: 不同专业有哪些？

SQL: SELECT DISTINCT Major FROM Student
问题: 显示所有学生居住的城市。

SQL: SELECT DISTINCT city_code FROM Student
问题: 学生居住在什么城市？

SQL: SELECT DISTINCT city_code FROM Student
问题: 显示所有女学生的名、姓氏、年龄。他们的性别是“女”.

SQL: SELECT Fname ,  Lname ,  Age FROM Student WHERE Sex  =  '女'
问题: 所有性别为“女”的女生全名和年龄是多少？

SQL: SELECT Fname ,  Lname ,  Age FROM Student WHERE Sex  =  '女'
问题: 显示所有男生的学生ID。

SQL: SELECT StuID FROM Student WHERE Sex  =  '男'
问题: 所有男生的学生ID是什么？

SQL: SELECT StuID FROM Student WHERE Sex  =  '男'
问题: 18岁的学生有多少？

SQL: SELECT count(*) FROM Student WHERE age  =  18
问题: 有多少18岁的学生？

SQL: SELECT count(*) FROM Student WHERE age  =  18
问题: 显示所有20岁以上的学生ID。

SQL: SELECT StuID FROM Student WHERE age  >  20
问题: 20岁以上学生的学生ID是什么？

SQL: SELECT StuID FROM Student WHERE age  >  20
问题: 姓“金”的学生住在哪个城市？

SQL: SELECT city_code FROM Student WHERE LName  =  "金"
问题: 给出姓“金”的学生所住的城市。

SQL: SELECT city_code FROM Student WHERE LName  =  "金"
问题: 谁是ID1004的学生的导师？

SQL: SELECT Advisor FROM Student WHERE StuID  =  1004
问题: 谁指导1004学生？

SQL: SELECT Advisor FROM Student WHERE StuID  =  1004
问题: “香港”或“深圳”有多少学生聚准？

SQL: SELECT count(*) FROM Student WHERE city_code  =  "香港" OR city_code  =  "深圳"
问题: 给出居住在“香港”或“深圳”学生的人数。

SQL: SELECT count(*) FROM Student WHERE city_code  =  "香港" OR city_code  =  "深圳"
问题: 显示所有学生的最低、平均和最大年龄。

SQL: SELECT min(age) ,  avg(age) ,  max(age) FROM Student
问题: 所有学生的最低年龄、平均年龄和最大年龄是多少？

SQL: SELECT min(age) ,  avg(age) ,  max(age) FROM Student
问题: 最小的学生的姓是什么？

SQL: SELECT LName FROM Student WHERE age  =  (SELECT min(age) FROM Student)
问题: 提供最年轻学生的姓氏。

SQL: SELECT LName FROM Student WHERE age  =  (SELECT min(age) FROM Student)
问题: 显示最老学生的学生ID。

SQL: SELECT StuID FROM Student WHERE age  =  (SELECT max(age) FROM Student)
问题: 最老的学生的学生ID是什么？

SQL: SELECT StuID FROM Student WHERE age  =  (SELECT max(age) FROM Student)
问题: 显示所有专业和相应的学生数量。

SQL: SELECT major ,  count(*) FROM Student GROUP BY major
问题: 每个专业有多少学生？

SQL: SELECT major ,  count(*) FROM Student GROUP BY major
问题: 哪个专业的学生最多？

SQL: SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: 最大的专业是什么？

SQL: SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1
问题: 显示所有年龄和对应学生的数量。

SQL: SELECT age ,  count(*) FROM Student GROUP BY age
问题: 每个学生年龄有多大？每个年龄段有多少学生？

SQL: SELECT age ,  count(*) FROM Student GROUP BY age
问题: 显示男女学生的平均年龄。

SQL: SELECT avg(age) ,  sex FROM Student GROUP BY sex
问题: 男女学生平均年龄是多少？

SQL: SELECT avg(age) ,  sex FROM Student GROUP BY sex
问题: 显示所有城市和相应的学生数量。

SQL: SELECT city_code ,  count(*) FROM Student GROUP BY city_code
问题: 每个城市有多少学生？

SQL: SELECT city_code ,  count(*) FROM Student GROUP BY city_code
问题: 显示所有的顾问和相应的学生人数。

SQL: SELECT advisor ,  count(*) FROM Student GROUP BY advisor
问题: 每位导师有多少学生？

SQL: SELECT advisor ,  count(*) FROM Student GROUP BY advisor
问题: 哪位导师的学生最多？

SQL: SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
问题: 给出最多学生的导师。

SQL: SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1
问题: 有多少学生患有“猫”过敏？

SQL: SELECT count(*) FROM Has_allergy WHERE Allergy  =  "猫"
问题: 有多少学生受到“猫”过敏的影响？

SQL: SELECT count(*) FROM Has_allergy WHERE Allergy  =  "猫"
问题: 显示所有至少有两种过敏症的学生。

SQL: SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*)  >=  2
问题: 有多个过敏反应的的学生的学生ID是什么？

SQL: SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*)  >=  2
问题: 没有过敏的学生的学生ID是什么？

SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
问题: 哪些学生不受过敏影响？

SQL: SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
问题: 有多少女学生有“鸡蛋”或“牛奶”过敏？

SQL: SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.sex  =  "女" AND T1.allergy  =  "牛奶" OR T1.allergy  =  "鸡蛋"
问题: 有多少女生对“鸡蛋”或“牛奶"过敏？

SQL: SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.sex  =  "女" AND T1.allergy  =  "牛奶" OR T1.allergy  =  "鸡蛋"
问题: 有多少学生有“食物”过敏？

SQL: SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy WHERE T2.allergytype  =  "食物"
问题: 有多少学生受“食物”过敏的影响？

SQL: SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy WHERE T2.allergytype  =  "食物"
问题: 哪些过敏反应影响的学生数量最多？

SQL: SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
问题: 哪种过敏最常见？

SQL: SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1
问题: 显示所有受过敏影响的学生人数。

SQL: SELECT Allergy ,  count(*) FROM Has_allergy GROUP BY Allergy
问题: 每种过敏反应有多少学生？

SQL: SELECT Allergy ,  count(*) FROM Has_allergy GROUP BY Allergy
问题: 显示所有过敏类型与受影响的学生数量。

SQL: SELECT T2.allergytype ,  count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy GROUP BY T2.allergytype
问题: 每一种过敏类型有多少学生受影响？

SQL: SELECT T2.allergytype ,  count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy GROUP BY T2.allergytype
问题: 找出对“牛奶”和“猫”过敏的学生的姓氏和年龄。

SQL: SELECT lname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "牛奶" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy  =  "猫")
问题: 对“牛奶”和“猫”过敏的学生的姓氏和年龄是多少？

SQL: SELECT lname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "牛奶" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy  =  "猫")
问题: 名字是“莎莎”的学生有哪些过敏症和过敏类型？并以过敏反应的名称来分类结果。

SQL: SELECT T1.Allergy ,  T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy  =  T2.Allergy JOIN Student AS T3 ON T3.StuID  =  T2.StuID WHERE T3.Fname  =  "莎莎" ORDER BY T1.Allergy
问题: 那个叫“莎莎”的女孩有什么过敏反应？它们的类型是什么？并以过敏反应的名称来分类结果。

SQL: SELECT T1.Allergy ,  T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy  =  T2.Allergy JOIN Student AS T3 ON T3.StuID  =  T2.StuID WHERE T3.Fname  =  "莎莎" ORDER BY T1.Allergy
问题: 找出对“牛奶”过敏但不对“猫”过敏的学生的名字和性别。

SQL: SELECT fname ,  sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "牛奶" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy  =  "猫")
问题: 对“牛奶”过敏但能忍受“猫”的学生的名字和性别是什么？

SQL: SELECT fname ,  sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "牛奶" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy  =  "猫")
问题: 找出对“动物”和“食物”类型过敏的学生的平均年龄。

SQL: SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "动物")
问题: 对“动物”和“食物”过敏的学生的平均年龄有多大？

SQL: SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "动物")
问题: 列出没有“食物”过敏的学生的名字和姓氏。

SQL: SELECT fname ,  lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物")
问题: 对任何类型的“食物”都不过敏的每个学生的全名是什么？

SQL: SELECT fname ,  lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物")
问题: 找到有“食物”类型过敏的男性(性别是“男”)的数量。

SQL: SELECT count(*) FROM Student WHERE sex  =  "男" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物")
问题: 有多少男学生(性别是“男”)对任何类型的“食物”过敏？

SQL: SELECT count(*) FROM Student WHERE sex  =  "男" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物")
问题: 找出对“牛奶”或“猫”过敏的学生的不同名字和城市。

SQL: SELECT DISTINCT T1.fname ,  T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid  =  T2.stuid WHERE T2.Allergy  =  "牛奶" OR T2.Allergy  =  "猫"
问题: 那些对“牛奶”或“猫”过敏的学生的不同名字和城市是什么？

SQL: SELECT DISTINCT T1.fname ,  T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid  =  T2.stuid WHERE T2.Allergy  =  "牛奶" OR T2.Allergy  =  "猫"
问题: 找出18岁以上、对“食物”和“动物”不过敏的学生人数。

SQL: SELECT count(*) FROM Student WHERE age  >  18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物" OR T2.allergytype  =  "动物")
问题: 有多少学生超过18岁，对“食物”类型或“动物”类型不过敏？

SQL: SELECT count(*) FROM Student WHERE age  >  18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "食物" OR T2.allergytype  =  "动物")
问题: 找到对“大豆”不过敏的学生的名字和专业。

SQL: SELECT fname ,  major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "大豆")
问题: 可以食用“大豆”的学生的名字和专业是什么？

SQL: SELECT fname ,  major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "大豆")
问题: 给我一个发票数量前5的国家的列表。列出国家名称和发票数量。

SQL: SELECT billing_country ,  COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;
问题: 发票数量最多的5个国家是什么？他们有多少发票？

SQL: SELECT billing_country ,  COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;
问题: 一个发票总额前8的国家的列表。列出国家名称和发票总额。

SQL: SELECT billing_country ,  SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;
问题: 按发票总额计算，前8个国家的名称是什么？那些总额有多大？

SQL: SELECT billing_country ,  SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;
问题: 平均发票大小前10的国家的列表。列出国家名称和平均发票大小。

SQL: SELECT billing_country ,  AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;
问题: 平均发票大小最大的国家的名称和平均发票大小是多少？

SQL: SELECT billing_country ,  AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;
问题: 找出最近购买了东西的5个客户。列出客户的名字和姓氏。

SQL: SELECT T1.first_name ,  T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id ORDER BY T2.invoice_date DESC LIMIT 5;
问题: 最近买东西的5个顾客的名字和姓是什么？

SQL: SELECT T1.first_name ,  T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id ORDER BY T2.invoice_date DESC LIMIT 5;
问题: 从订单总数中找出前10名客户。列出客户的姓氏和总订单数量。

SQL: SELECT T1.first_name ,  T1.last_name ,  COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
问题: 按订单总数计算，前十位客户的姓名和名字是什么？他们订了多少货？

SQL: SELECT T1.first_name ,  T1.last_name ,  COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
问题: 列出总销售额的前10名客户。列出客户的姓名和总销售额。

SQL: SELECT T1.first_name ,  T1.last_name ,  SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
问题: 销售总额最高的前10位客户的姓氏和名字是什么？销售量是多少？

SQL: SELECT T1.first_name ,  T1.last_name ,  SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
问题: 按照曲目数列出前5的流派。列出流派名称和总曲目。

SQL: SELECT T1.name ,  COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;
问题: 前5名的流派有多少曲目，名字是什么？

SQL: SELECT T1.name ,  COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;
问题: 列出每一张专辑的标题。

SQL: SELECT title FROM albums;
问题: 所有专辑的标题是什么？

SQL: SELECT title FROM albums;
问题: 按专辑标题升序排列，列出每张专辑。

SQL: SELECT title FROM albums ORDER BY title;
问题: 按字母升序排列的所有专辑的标题是什么？

SQL: SELECT title FROM albums ORDER BY title;
问题: 将标题以字母顺序排序，列出每个专辑。

SQL: SELECT title FROM albums WHERE title LIKE '安' ORDER BY title;
问题: 以字母顺序排序的所有专辑的标题是什么？

SQL: SELECT title FROM albums WHERE title LIKE '安' ORDER BY title;
问题: 列出10个最便宜的发票的客户的名字和姓氏。

SQL: SELECT T1.first_name ,  T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id ORDER BY total LIMIT 10;
问题: 最便宜的10张发票的客户的姓名是什么？

SQL: SELECT T1.first_name ,  T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id ORDER BY total LIMIT 10;
问题: 列出“四川”，“成都”市发票总额。

SQL: SELECT sum(total) FROM invoices WHERE billing_city  =  "成都" AND billing_state  =  "四川";
问题: “四川”州“成都”市的发票金额是多少？

SQL: SELECT sum(total) FROM invoices WHERE billing_city  =  "成都" AND billing_state  =  "四川";
问题: 列出“四川”,“成都”的发票数量。

SQL: SELECT COUNT(*) FROM invoices WHERE billing_city  =  "成都" AND billing_state  =  "四川";
问题: 从“四川”,“成都”开出多少发票？

SQL: SELECT COUNT(*) FROM invoices WHERE billing_city  =  "成都" AND billing_state  =  "四川";
问题: 列出按州分组的美国发票数量。

SQL: SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "美国" GROUP BY billing_state;
问题: 每个州有多少发票？

SQL: SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "美国" GROUP BY billing_state;
问题: 列出美国发票最多的州。

SQL: SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "美国" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;
问题: 发票最多的州是什么州？

SQL: SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "美国" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;
问题: 列出“浙江”省的发票数量和发票总额。

SQL: SELECT billing_state ,  COUNT(*) ,  SUM(total) FROM invoices WHERE billing_state  =  "浙江";
问题: “浙江”省的发票金额和总金额是多少？

SQL: SELECT billing_state ,  COUNT(*) ,  SUM(total) FROM invoices WHERE billing_state  =  "浙江";
问题: 列出“零点乐队”的专辑。

SQL: SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "零点乐队";
问题: 所有“零点乐队”的专辑的标题是什么？

SQL: SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "零点乐队";
问题: “周杰伦”有多少张专辑？

SQL: SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "周杰伦";
问题: “周杰伦”发行了多少张专辑？

SQL: SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "周杰伦";
问题: “宋” “志鹏”是哪家公司的客户？

SQL: SELECT company FROM customers WHERE first_name = "宋" AND last_name = "志鹏";
问题: 客户为“宋” “志鹏”的公司是什么？

SQL: SELECT company FROM customers WHERE first_name = "宋" AND last_name = "志鹏";
问题: “卢” “军”的电子邮件和电话号码是多少？

SQL: SELECT email ,  phone FROM customers WHERE first_name = "卢" AND last_name = "军";
问题: 客户“卢” “军”的电子邮件和电话号码是多少？

SQL: SELECT email ,  phone FROM customers WHERE first_name = "卢" AND last_name = "军";
问题: “唐山”市有多少客户？

SQL: SELECT count(*) FROM customers WHERE city = "唐山";
问题: “唐山”市有多少顾客？

SQL: SELECT count(*) FROM customers WHERE city = "唐山";
问题: “浙江”州有多少客户？

SQL: SELECT count(*) FROM customers WHERE state = "浙江";
问题: 来自“浙江”的客户有多少？

SQL: SELECT count(*) FROM customers WHERE state = "浙江";
问题: “姜” “子玉”住在哪个国家？

SQL: SELECT country FROM customers WHERE first_name = "姜" AND last_name = "子玉";
问题: “姜” “子玉”在哪个国家？

SQL: SELECT country FROM customers WHERE first_name = "姜" AND last_name = "子玉";
问题: 列出由名为“强"的艺术家发布的专辑名称。

SQL: SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id  =  T2.artist_id WHERE T1.name LIKE '强'
问题: 名字为“强"的艺术家发行的专辑的名称是什么？

SQL: SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id  =  T2.artist_id WHERE T1.name LIKE '强'
问题: “马” “志强”拥有多少客户？

SQL: SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "马" AND T1.last_name = "志强";
问题: “马” “志强”拥有的客户数是多少？

SQL: SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "马" AND T1.last_name = "志强";
问题: “袁” “熙”的头衔、电话和租用日期是什么？

SQL: SELECT title ,  phone ,  hire_date FROM employees WHERE first_name = "袁" AND last_name = "熙";
问题: 叫“袁” “熙”的员工的头衔、电话号码和雇佣日期是什么？

SQL: SELECT title ,  phone ,  hire_date FROM employees WHERE first_name = "袁" AND last_name = "熙";
问题: 找到向“袁” “熙”汇报的员工的全名？

SQL: SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "袁" AND T1.last_name = "熙";
问题: 向“袁” “熙”汇报工作的员工的名和姓氏是什么？

SQL: SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "袁" AND T1.last_name = "熙";
问题: 雇员“袁” “熙”的地址是什么？

SQL: SELECT address FROM employees WHERE first_name = "袁" AND last_name = "熙";
问题: “袁” “熙”的地址是什么？

SQL: SELECT address FROM employees WHERE first_name = "袁" AND last_name = "熙";
问题: 查找拥有最多客户的雇员的全名。

SQL: SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id  =  T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
问题: 拥有最多客户的员工的全名是什么？

SQL: SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id  =  T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
问题: 加拿大有多少员工？

SQL: SELECT count(*) FROM employees WHERE country = "加拿大";
问题: “袁” “熙”的电话号码是什么？

SQL: SELECT phone FROM employees WHERE first_name = "袁" AND last_name = "熙";