jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 列出所有购买“键盘”的不同客户的名字。

SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "键盘"
问题: 购买“键盘”的客户不同的名字是什么？

SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "键盘"
问题: 列出所有供应“红色牛仔裤”的不同供应商的名字和电话号码。

SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "红色牛仔裤"
问题: 供应“红色牛仔裤”的供应商的名字和电话号码是什么？

SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "红色牛仔裤"
问题: 按产品类型分组并按字母顺序排序的产品的最高和最低价格是什么？

SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
问题: 按产品类型分组和排序并给出每个产品类型的最高和最低产品价格。

SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
问题: 列出按订单日期排序的、处于“取消”状态的订单的订单id、客户id。

SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "取消" ORDER BY order_date
问题: 对于已经“取消”状态的订单，按订单日期排序的订单id和客户id是什么？

SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "取消" ORDER BY order_date
问题: 找出至少由两个不同客户购买的产品名称。

SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
问题: 由至少两个不同的客户购买的产品的名称是什么？

SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
问题: 找出至少购买三种不同产品的客户的名字。

SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
问题: 购买了至少三种不同产品的客户不同名字是什么？

SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
问题: 找出被任命为“销售员”，但从未担任“文书职员”的员工的姓名和性别。

SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "销售员" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "文书职员"
问题: 拥有“销售员”头衔，但从未担任过“文书职员”的职员的姓名和性别是什么？

SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "销售员" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "文书职员"
问题: 查找地址包含“湖南”省且不使用“信用卡”付款的客户的ID和名字。

SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "湖南" AND payment_method_code != "信用卡"
问题: 地址包含“湖南”省且不使用“信用卡”付款的客户的ID和名字是什么？

SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "湖南" AND payment_method_code != "信用卡"
问题: 找出所有“服装”产品的平均价格。

SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  '服装'
问题: “服装”的平均价格是多少？

SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  '服装'
问题: 找到最贵的“硬件”产品的名称。

SQL: SELECT product_name FROM products WHERE product_type_code  =  '硬件' ORDER BY product_price DESC LIMIT 1
问题: 最昂贵的“硬件”产品的名称是什么？

SQL: SELECT product_name FROM products WHERE product_type_code  =  '硬件' ORDER BY product_price DESC LIMIT 1
问题: 有多少架飞机？

SQL: SELECT count(*) FROM aircraft
问题: 飞机的数量是多少？

SQL: SELECT count(*) FROM aircraft
问题: 列出所有飞机的描述。

SQL: SELECT Description FROM aircraft
问题: 飞机的描述是什么？

SQL: SELECT Description FROM aircraft
问题: 所有机场的国际旅客平均人数是多少？

SQL: SELECT avg(International_Passengers) FROM airport
问题: 机场的国际旅客平均人数是多少？

SQL: SELECT avg(International_Passengers) FROM airport
问题: “北京首都机场”机场的国际和国内旅客人数是多少？

SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "北京首都机场"
问题: “北京首都机场”机场有多少国际旅客和国内旅客？

SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "北京首都机场"
问题: 包含“北京”这个词的机场的国内旅客总数是多少？

SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "北京"
问题: “北京”机场的国内旅客总数是多少？

SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "北京"
问题: 所有机场的过境旅客的最大和最小数量是多少？

SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
问题: 所有机场过境旅客的最大值和最小值是多少？

SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
问题: 25岁或以上的飞行员叫什么名字？

SQL: SELECT Name FROM pilot WHERE Age  >=  25
问题: 至少25岁的每名飞行员的名字是什么？

SQL: SELECT Name FROM pilot WHERE Age  >=  25
问题: 按字母升序顺序列出所有的飞行员的名字。

SQL: SELECT Name FROM pilot ORDER BY Name ASC
问题: 飞行员按字母顺序排列的名字是什么？

SQL: SELECT Name FROM pilot ORDER BY Name ASC
问题: 按降序字母顺序列出所有30岁或以下的飞行员的名字。

SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
问题: 按字母降序排列的所有30岁或30岁的飞行员的名字是什么？

SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
问题: 请显示与“北京南苑”机场有关的飞机的名称。

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京南苑"
问题: “北京南苑”机场的所有飞机的名称是什么？

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京南苑"
问题: 请出示与总旅客数超过10万人的机场有关的飞机的名称和说明。

SQL: SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000
问题: 与总旅客数超过10万人的机场有关的飞机的名称和描述是什么？

SQL: SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000
问题: 与“歼-10”飞机有关的机场的平均旅客总数是多少？

SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "歼-10"
问题: “歼-10”飞机访问的所有机场的平均旅客总数是多少？

SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "歼-10"
问题: 请列出地点和获奖的飞机名称。

SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
问题: 获奖的飞机的位置和名称是什么？

SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
问题: 列出被评为获奖飞机次数最多的飞机的名称。

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
问题: 得奖次数最多的飞机叫什么名字？

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出飞机的名称和赢得比赛的次数。

SQL: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
问题: 每架获奖的飞机叫什么名字？获奖多少次？

SQL: SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
问题: 按年龄递减顺序列出所有飞行员的姓名。

SQL: SELECT Name FROM pilot ORDER BY Age DESC
问题: 按降序列出的所有飞行员的名字是什么？

SQL: SELECT Name FROM pilot ORDER BY Age DESC
问题: 列出至少赢得两次比赛飞机的名称。

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2
问题: 所有赢得至少两场比赛的飞机的名字是什么？

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*)  >=  2
问题: 列出没有赢得任何比赛的飞机名字。

SQL: SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
问题: 那些从来没有赢得任何比赛的飞机的名字是什么？

SQL: SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)
问题: 显示与名为“北京首都机场”的机场和“北京南苑”的机场相关联的飞机的名称

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京首都机场" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京南苑"
问题: 与“北京首都机场”机场和“北京南苑”机场有关的所有飞机的名称是什么？

SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京首都机场" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "北京南苑"
问题: 显示国际旅客最多的机场的所有信息。

SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
问题: 国际旅客最多的机场有哪些信息？

SQL: SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1
问题: 找出在30岁以下的飞行员中获胜次数最多的飞行员的姓名和年龄。

SQL: SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot WHERE t1.age  <  30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1
问题: 获胜次数最多的30岁以下的飞行员的姓名和年龄是多少？

SQL: SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot WHERE t1.age  <  30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1
问题: 最年轻的获奖飞行员的名字和年龄是多少？

SQL: SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot ORDER BY t1.age LIMIT 1
问题: 最年轻的中奖飞行员年龄多大？他们叫什么名字？

SQL: SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot ORDER BY t1.age LIMIT 1
问题: 找出在“澳大利亚”举行的比赛中没有获胜的飞行员的名字。

SQL: SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot  FROM MATCH WHERE country  =  '澳大利亚')
问题: 在“澳大利亚”没有赢得任何比赛的飞行员的名字是什么？

SQL: SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot  FROM MATCH WHERE country  =  '澳大利亚')
问题: 每个房产有多少居民？列出属性ID和常驻计数。

SQL: SELECT T1.property_id ,  count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id  =  T2.property_id GROUP BY T1.property_id
问题: 有“父子聚会”细节的组织提供哪些不同的服务类型？

SQL: SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id  =  T2.organization_id WHERE T2.organization_details  =  '父子聚会'
问题: 每个居民需要多少服务？以计数的降序列出常驻ID、详细信息和计数。

SQL: SELECT T1.resident_id ,  T1.other_details ,  count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id  =  T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC
问题: 提供某一服务的最大数目是多少？列出服务ID、详细信息和号码。

SQL: SELECT T1.service_id ,  T1.service_details ,  count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id  =  T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1
问题: 列出每个事物的id和类型，以及拥有它的组织的详细信息。

SQL: SELECT T1.thing_id ,  T1.type_of_Thing_Code ,  T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id  =  T2.organization_id
问题: 有3个事件的客户的id和细节是什么？

SQL: SELECT T1.customer_id ,  T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  3
问题: 每个客户的移动日期是什么，以及相应的客户ID和细节？

SQL: SELECT T2.date_moved_in ,  T1.customer_id ,  T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id  =  T2.customer_id
问题: 哪些事件有一到三的记录？列出事件ID和属性ID。

SQL: SELECT T1.Customer_Event_ID  ,  T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID  =  T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3
问题: 在日期“2017-06-19 02:59:21”之前具有“关闭”状态或状态记录的事物的不同id和类型是什么？

SQL: SELECT DISTINCT T2.thing_id ,  T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.Status_of_Thing_Code  =  '关闭' OR T1.Date_and_Date  <  '2017-06-19 02:59:21'
问题: 有多少个不同的地点位于有东西的服务细节是“不满意的”的地方？

SQL: SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.service_details  =  '不满意的'
问题: 有多少种不同的状态代码？

SQL: SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
问题: 哪些组织不是其他组织的父组织？列出组织ID。

SQL: SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
问题: 居民入住的最后一天是什么时候？

SQL: SELECT max(date_moved_in) FROM Residents
问题: 包含子字符串“女士”的驻留详细信息是什么？

SQL: SELECT other_details FROM Residents WHERE other_details LIKE '女士'
问题: 列出客户事件ID和日期，入住日期和属性ID。

SQL: SELECT customer_event_id ,  date_moved_in ,  property_id FROM customer_events
问题: 有多少客户没有任何活动？

SQL: SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )
问题: 居民的日期有什么不同？

SQL: SELECT DISTINCT date_moved_in FROM residents
问题: 按升学顺序列出学校的位置。

SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
问题: 按入学升序排列的学校位置列表是什么？

SQL: SELECT LOCATION FROM school ORDER BY Enrollment ASC
问题: 按创办年的降序列出学校的位置。

SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
问题: 学校创办年降序排列的学校名单是什么？

SQL: SELECT LOCATION FROM school ORDER BY Founded DESC
问题: 教派教不是“天主教”的学校的入学人数是什么？

SQL: SELECT Enrollment FROM school WHERE Denomination != "天主教"
问题: 列出没有“天主教”教派的每所学校的入学人数。

SQL: SELECT Enrollment FROM school WHERE Denomination != "天主教"
问题: 学校平均入学数是多少？

SQL: SELECT avg(Enrollment) FROM school
问题: 以平均入学数为准。

SQL: SELECT avg(Enrollment) FROM school
问题: 按字母升序排列的队伍的球员是什么？

SQL: SELECT Team FROM player ORDER BY Team ASC
问题: 找到每个球员的队伍并按字母顺序排列它们。

SQL: SELECT Team FROM player ORDER BY Team ASC
问题: 球员有多少不同的位置？

SQL: SELECT count(DISTINCT POSITION) FROM player
问题: 计算不同球员位置的数量。

SQL: SELECT count(DISTINCT POSITION) FROM player
问题: 找到最高年龄球员的队伍。

SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
问题: 哪个队的球员年龄最大？

SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 1
问题: 列出前5名年龄最大的球员所在的队伍。

SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
问题: 有5个最老球员的球队是什么？

SQL: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
问题: 对于每个球员，显示他们所在的队伍和学校的所在地。

SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
问题: 每个球员的队伍和学校的位置是什么？

SQL: SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID
问题: 展示有超过1名球员的学校的位置。

SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
问题: 哪些学校有超过1名球员？给我学校的位置。

SQL: SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1
问题: 显示拥有最多球员的学校的教派。

SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
问题: 拥有最多数球员的学校的教派是什么？

SQL: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示学校的地点和昵称。

SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
问题: 每个学校的位置和昵称是什么？

SQL: SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID
问题: 请出示不同的教派和相应的学校的数量。

SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
问题: 对于每个教派，返回教派和具有该教派的学校的数量。

SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination
问题: 请按降序显示不同的教派和相应的学校数量。

SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
问题: 按学校数量的降序排列教派。返回每个教派及其对应学校的数量。

SQL: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
问题: 列出学校招生人数最多的学校颜色。

SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
问题: 招生人数最多的学校的学校色彩是什么？

SQL: SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1
问题: 列出没有任何球员的学校的位置。

SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
问题: 哪些学校没有球员？给我学校的位置。

SQL: SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)
问题: 显示1890年前建立的学校和1900后建立的学校所共有的教派

SQL: SELECT Denomination FROM school WHERE Founded  <  1890 INTERSECT SELECT Denomination FROM school WHERE Founded  >  1900
问题: 1890年以前建立的学校和1900年以后建立的学校都使用什么教派?

SQL: SELECT Denomination FROM school WHERE Founded  <  1890 INTERSECT SELECT Denomination FROM school WHERE Founded  >  1900
问题: 显示不属于“第一机构”的学校的昵称。

SQL: SELECT Nickname FROM school_details WHERE Division != "第一机构"
问题: 不是“第一机构”学校划分的是什么？

SQL: SELECT Nickname FROM school_details WHERE Division != "第一机构"
问题: 显示一个以上学校共享的教派。

SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
问题: 一个学校有多少教派？

SQL: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
问题: 查找城市区域降序排列的所有区域名称。

SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
问题: 按市区区域降序排列的不同的区域名称是什么？

SQL: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
问题: 找出具有超过3个产品列表的页面大小列表

SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*)  >  3
问题: 超过3个产品列表的所有产品的最大页面大小是多少？

SQL: SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*)  >  3
问题: 查找人口在20万到200万之间的地区的名称和人口

SQL: SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
问题: 20万到200万居民之间的所有地区的区名和城市人口是多少？

SQL: SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
问题: 查找城市面积大于10或人口大于10万的所有地区的名称

SQL: SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000
问题: 市区面积大于10或居住10万人以上的地区名称是什么？

SQL: SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000
问题: 哪个地区人口最多？

SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
问题: 居民最多的地区叫什么名字？

SQL: SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
问题: 哪个地区的面积最少？

SQL: SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
问题: 面积最小的地区叫什么名字？

SQL: SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
问题: 找出总面积最大的3个区的总人口。

SQL: SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
问题: 三大最大区域的居民总数是多少？

SQL: SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
问题: 查找所有类型的商店和其对应的数量。

SQL: SELECT TYPE ,  count(*) FROM store GROUP BY TYPE
问题: 对于每种类型的商店，有多少种？

SQL: SELECT TYPE ,  count(*) FROM store GROUP BY TYPE
问题: 找到“上城区”所有商店的名称。

SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t3.district_name  =  "上城区"
问题: “上城区”所有商店的名称是什么？

SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t3.district_name  =  "上城区"
问题: 找到人口最多的地区所有的商店。

SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id WHERE district_id  =  (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
问题: 人口最多的地区所有商店的名称是什么？

SQL: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id WHERE district_id  =  (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
问题: 哪个城市是“卡西欧”店的总部？

SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.store_name  =  "卡西欧"
问题: 哪个商店是“卡西欧”商场的总部？

SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.store_name  =  "卡西欧"
问题: 查找每个城市的商店数量。

SQL: SELECT t3.headquartered_city ,  count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city
问题: 每个城市都有多少商店的总部？

SQL: SELECT t3.headquartered_city ,  count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city
问题: 找到拥有最多商店的城市。

SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
问题: 哪一个城市的旗舰店数量最多？

SQL: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
问题: 每分钟颜色的平均页数是多少？

SQL: SELECT avg(pages_per_minute_color) FROM product
问题: 每分钟颜色的平均页数的数量是多少？

SQL: SELECT avg(pages_per_minute_color) FROM product
问题: 叫“安踏”商店里有什么产品？

SQL: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id  =  t2.product_id JOIN store AS t3 ON t2.store_id  =  t3.store_id WHERE t3.store_name  =  "安踏"
问题: 在“安踏”店里卖什么产品？

SQL: SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id  =  t2.product_id JOIN store AS t3 ON t2.store_id  =  t3.store_id WHERE t3.store_name  =  "安踏"
问题: 找到最大页面大小为“A4”且每分钟页面颜色小于5的产品。

SQL: SELECT product FROM product WHERE max_page_size  =  "A4" AND pages_per_minute_color  <  5
问题: 哪些产品具有最大页面大小为“A4”，并且每分钟页面颜色小于5？

SQL: SELECT product FROM product WHERE max_page_size  =  "A4" AND pages_per_minute_color  <  5
问题: 找出最大页面大小为“A4”或每分钟页面颜色小于5的产品。

SQL: SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5
问题: 什么是最大页面大小等于“A4”或每分钟页面颜色小于5的产品？

SQL: SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5
问题: 查找所有包含“扫描仪”一词产品的名称。

SQL: SELECT product FROM product WHERE product LIKE "扫描仪"
问题: 所有的其名称包括子字符串“扫描仪”的产品有哪些？

SQL: SELECT product FROM product WHERE product LIKE "扫描仪"
问题: 找出在所有产品中最常用的最大页面大小。

SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
问题: 最常用的最大页面的大小是什么？

SQL: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
问题: 查找不使用最常用最大页面大小的产品的名称。

SQL: SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
问题: 不是最常使用的最大页面大小的所有产品的名称是什么？

SQL: SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
问题: 找出面积大于平均城市面积的区域的总人口。

SQL: SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)
问题: 面积大于城市平均面积的所有地区的人口总数是多少？

SQL: SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)
问题: 查找同时具有“大型商场”和“便利店”类型的商店的地区的名称。

SQL: SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.Type  =  "大型商场" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.Type  =  "便利店"