jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 有多少孩子待在2010年9月21日“田” “智”入住的房间里？

SQL: SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "田" AND LastName  =  "智";
问题: 返回由“田” “智”于2010年9月21日预订并登记入住的房间的孩子数量。

SQL: SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "田" AND LastName  =  "智";
问题: 那里有多少张“大床”？

SQL: SELECT sum(beds) FROM Rooms WHERE bedtype  =  '大床';
问题: 找到可用的“大床”的总数。

SQL: SELECT sum(beds) FROM Rooms WHERE bedtype  =  '大床';
问题: 按价格排序列出有“大床”的房间的名称和装饰。

SQL: SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  '大床' ORDER BY basePrice;
问题: 按价格排序排列的有一张“大床”的房间的名称和装饰是什么。

SQL: SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  '大床' ORDER BY basePrice;
问题: 哪个房间的底价最便宜？列出房间的名称和底价。

SQL: SELECT roomName ,  basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;
问题: 最低底价的房间名称和底价是多少？

SQL: SELECT roomName ,  basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;
问题: “北欧风格”房间的装饰是什么？

SQL: SELECT decor FROM Rooms WHERE roomName  =  "北欧风格";
问题: 返回房间名为“北欧风格”的装饰。

SQL: SELECT decor FROM Rooms WHERE roomName  =  "北欧风格";
问题: 不同床位的平均底价是多少？列出床位类型和平均底价。

SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
问题: 对于每一床类型，找出不同床类型对应的平均底价。

SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
问题: 能住在这家旅店的现代风格客房的总人数是多少？

SQL: SELECT sum(maxOccupancy) FROM Rooms WHERE decor  =  '现代化';
问题: 总共有多少人能住在这家旅店的现代风格房间里？

SQL: SELECT sum(maxOccupancy) FROM Rooms WHERE decor  =  '现代化';
问题: 什么样的装饰预订量最少？

SQL: SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
问题: 预定量最少的装饰是什么？

SQL: SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
问题: 列出房间人的数量达到最大容量的次数。人的数量包括成年人和孩子。

SQL: SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;
问题: 住在一个房间里的成年人和孩子的数量达到房间最大容量的次数是多少？

SQL: SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;
问题: 找出支付高于房间底价的人的名字和姓氏。

SQL: SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
问题: 支付高于房间底价的人的名字和姓氏是什么？

SQL: SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0
问题: 有多少房间？

SQL: SELECT count(*) FROM Rooms;
问题: 这家旅店的房间总数是多少？

SQL: SELECT count(*) FROM Rooms;
问题: 找一张有“大床”的房间。

SQL: SELECT count(*) FROM Rooms WHERE bedType  =  "大床";
问题: 有多少个房间有“大床”国王床？

SQL: SELECT count(*) FROM Rooms WHERE bedType  =  "大床";
问题: 找出每种床类型的房间数。

SQL: SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;
问题: 每种床类型的房间数是多少？

SQL: SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;
问题: 找出最大容量房间的名称。

SQL: SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
问题: 能容纳人数最多的房间叫什么名字？

SQL: SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
问题: 找到底价最贵的房间的ID和房间名称。

SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
问题: 哪一个房间的底价最高？

SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
问题: 列出所有传统类型房间的床的类型和名称。

SQL: SELECT roomName ,  bedType FROM Rooms WHERE decor = "传统";
问题: 有传统类型装饰的所有房间的床的类型和名称是什么？

SQL: SELECT roomName ,  bedType FROM Rooms WHERE decor = "传统";
问题: 找到每一个装饰类型有“大床”的房间数。

SQL: SELECT decor ,  count(*) FROM Rooms WHERE bedType = "大床" GROUP BY decor;
问题: 有多少个房间有“大床”？报告每个装饰类型的这样房间数量。

SQL: SELECT decor ,  count(*) FROM Rooms WHERE bedType = "大床" GROUP BY decor;
问题: 找出不同装修风格的房间平均价格和最低价格。

SQL: SELECT decor , avg(basePrice) ,  min(basePrice) FROM Rooms GROUP BY decor;
问题: 每个不同装修风格的房间平均最低价格是多少？

SQL: SELECT decor , avg(basePrice) ,  min(basePrice) FROM Rooms GROUP BY decor;
问题: 列出按其价格排序的所有房间名称。

SQL: SELECT roomName FROM Rooms ORDER BY basePrice;
问题: 按价格排序所有房间的名称。

SQL: SELECT roomName FROM Rooms ORDER BY basePrice;
问题: 找到不同装修风格且价格超过120的房间数量。

SQL: SELECT decor , count(*) FROM Rooms WHERE basePrice  >  120 GROUP BY decor;
问题: 每一种不同的装修风格，有多少房间的价格超过120？

SQL: SELECT decor , count(*) FROM Rooms WHERE basePrice  >  120 GROUP BY decor;
问题: 对于每个床类型，找到平均房间价格。

SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
问题: 每种不同床类型的房间的平均底价是多少？

SQL: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;
问题: 列出有“大床”或“双人”床的房间名称。

SQL: SELECT roomName FROM Rooms WHERE bedType  =  "大床" OR bedType  =  "双人";
问题: 有“大床”或“双人”床的房间的名称是什么？

SQL: SELECT roomName FROM Rooms WHERE bedType  =  "大床" OR bedType  =  "双人";
问题: 有多少种不同的床？

SQL: SELECT count(DISTINCT bedType) FROM Rooms;
问题: 在旅店找出不同床类型的数量。

SQL: SELECT count(DISTINCT bedType) FROM Rooms;
问题: 找到最贵的3个房间的名字和ID。

SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
问题: 三个最高价房间的名字和ID是什么？

SQL: SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
问题: 查找价格高于平均价格的房间名称。

SQL: SELECT roomName FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );
问题: 哪些房间的价格比平均价格高？

SQL: SELECT roomName FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );
问题: 找出没有预订的房间的数量。

SQL: SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
问题: 还有多少房间没有预订？

SQL: SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
问题: 返回每个房间的名字和被预定的次数。

SQL: SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
问题: 对于每个房间，找到它的名字和预订的次数。

SQL: SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room
问题: 查找已预订超过60次的房间名称。

SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
问题: 预订次数超过60的房间名称是什么？

SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room HAVING count(*)  >  60
问题: 找到底价在120和150之间的房间名称。

SQL: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
问题: 哪些房间的价格在120到150之间？返回房间的名字。

SQL: SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
问题: 找出客户名包括'浩'字的客户预定的房间的名称。

SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '浩'
问题: 客户名包括“浩”字的客户预订的房间叫什么名字？

SQL: SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '浩'
问题: 交叉参考码的“税收”的cmi的详细信息是什么？

SQL: SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T2.source_system_code  =  '税收'
问题: 与至少一个理事会税务条目相关的cmi交叉参考ID是什么？列出交叉引用ID和源系统代码。

SQL: SELECT T1.cmi_cross_ref_id ,  T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*)  >=  1
问题: 与每个CMI交叉引用相关的业务费率有多少？列出交叉引用ID、主客户ID和数量。

SQL: SELECT T2.cmi_cross_ref_id ,  T2.master_customer_id ,  count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id
问题: 什么是与利润和超额支付有关的税源系统代码？按利润ID排序列出代码和利润ID，。

SQL: SELECT T1.source_system_code ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id ORDER BY T2.council_tax_id
问题: 与每个停车罚款ID相关税的税源系统代码和主客户ID是什么？

SQL: SELECT T1.source_system_code ,  T1.master_customer_id ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id
问题: 客户主指数的详细信息不是与“高端”相关的租金拖欠税id是什么？

SQL: SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id  =  T2.master_customer_id WHERE T3.cmi_details != '高端'
问题: 有交叉参考源代码“选举”或“税收”的选举登记处的登记ID是什么？

SQL: SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id WHERE T2.source_system_code  =  '选举' OR T2.source_system_code  =  '税收'
问题: CMI交叉引用有多少种不同的源代码？

SQL: SELECT count(DISTINCT source_system_code) FROM CMI_cross_references
问题: 按详细信息按降序排序列出有关客户主索引的所有信息。

SQL: SELECT * FROM customer_master_index ORDER BY cmi_details DESC
问题: 列出所有停车罚款的市政税ID和相关的cmi。

SQL: SELECT council_tax_id ,  cmi_cross_ref_id FROM parking_fines
问题: 征收拖欠的市政税有多少？

SQL: SELECT count(*) FROM rent_arrears
问题: 与主客户详细信息“普通”相关的不同的交叉参考源系统代码是什么？

SQL: SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T1.cmi_details  =  '普通'
问题: 哪一个CMI交叉参考ID与任何停车税无关？

SQL: SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
问题: 哪种不同的源代码包含子字符串'en'？

SQL: SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE 'en'
问题: 有多少个聚会？

SQL: SELECT count(*) FROM party
问题: 统计聚会的数目。

SQL: SELECT count(*) FROM party
问题: 以主持人数量升序列出各个聚会的主题。

SQL: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
问题: 由主持人数量升序排序的每个聚会的主题是什么？

SQL: SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
问题: 聚会的主题和地点是什么？

SQL: SELECT Party_Theme ,  LOCATION FROM party
问题: 给出每个聚会的主题和地点。

SQL: SELECT Party_Theme ,  LOCATION FROM party
问题: 列出已“春季”或“科技”为主题的聚会第一年和最后一年。

SQL: SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "春季" OR Party_Theme  =  "科技"
问题: 主题为“春季”或“科技”的聚会的第一年和最后一年是什么？

SQL: SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "春季" OR Party_Theme  =  "科技"
问题: 每个聚会的主持人的平均人数是多少？

SQL: SELECT avg(Number_of_hosts) FROM party
问题: 计算每个聚会的主持人的平均数量。

SQL: SELECT avg(Number_of_hosts) FROM party
问题: 有最多主持人的聚会在什么地方？

SQL: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
问题: 哪个聚会的主持人数最多？给出聚会的地点。

SQL: SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
问题: 显示不同的国籍，以及每个国家的主持人人数。

SQL: SELECT Nationality ,  COUNT(*) FROM HOST GROUP BY Nationality
问题: 每个国家有多少主持人？列出国籍和对应数量。

SQL: SELECT Nationality ,  COUNT(*) FROM HOST GROUP BY Nationality
问题: 显示主持人最常见的国籍。

SQL: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪个国家拥有最多数量的主持人？

SQL: SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
问题: 展示拥有45岁以上和35岁以下的主持人的国家。

SQL: SELECT Nationality FROM HOST WHERE Age  >  45 INTERSECT SELECT Nationality FROM HOST WHERE Age  <  35
问题: 哪些国家有年龄在45岁以上的主持人和35岁以下的主持人？

SQL: SELECT Nationality FROM HOST WHERE Age  >  45 INTERSECT SELECT Nationality FROM HOST WHERE Age  <  35
问题: 显示聚会的主题和主持人的名字。

SQL: SELECT T3.Party_Theme ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID
问题: 对于每一聚会，返回它的主题的名称和对应的主持人的名字。

SQL: SELECT T3.Party_Theme ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID
问题: 按照主持人年龄的升序显示聚会的位置和聚会主持人的名称。

SQL: SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age
问题: 对于每一聚会，找出它的位置和主持人的名称。将结果按主持人年龄的升序排序。

SQL: SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age
问题: 显示主持人年龄大于50的聚会的位置。

SQL: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T2.Age  >  50
问题: 哪些聚会有的年龄超过50岁的主持人？给出聚会的地点。

SQL: SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T2.Age  >  50
问题: 显示主持人数大于20的聚会的主持人名字。

SQL: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T3.Number_of_hosts  >  20
问题: 哪些聚会拥有超过20个主持人？给我这些聚会的名字。

SQL: SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID WHERE T3.Number_of_hosts  >  20
问题: 显示最老主持人的名字和国籍。

SQL: SELECT Name ,  Nationality FROM HOST ORDER BY Age DESC LIMIT 1
问题: 最高年龄的主持人的姓名和国籍是什么？

SQL: SELECT Name ,  Nationality FROM HOST ORDER BY Age DESC LIMIT 1
问题: 列出在我们的记录中没有作为任何聚会的主持人的名字。

SQL: SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
问题: 在我们的记录中没有主办任何聚会的主持人的名字是什么？

SQL: SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
问题: 计算地区的数量。

SQL: SELECT count(*) FROM region
问题: 显示按代码排序的所有地区代码和地区名称。

SQL: SELECT region_code ,  region_name FROM region ORDER BY region_code
问题: 按代码排序所有地区的代码和名称是什么？

SQL: SELECT region_code ,  region_name FROM region ORDER BY region_code
问题: 按字母顺序列出所有区域名称。

SQL: SELECT region_name FROM region ORDER BY region_name
问题: 按字母顺序排列的地区名称是什么？

SQL: SELECT region_name FROM region ORDER BY region_name
问题: 显示除“丹麦”以外的所有地区的名称。

SQL: SELECT region_name FROM region WHERE region_name != '丹麦'
问题: 返回除“丹麦”以外的所有地区的名称。

SQL: SELECT region_name FROM region WHERE region_name != '丹麦'
问题: 有多少风暴中有死亡记录？

SQL: SELECT count(*) FROM storm WHERE Number_Deaths  >  0
问题: 统计至少有1人死亡的风暴数。

SQL: SELECT count(*) FROM storm WHERE Number_Deaths  >  0
问题: 列出所有至少有1人死亡的风暴的名称、活动日期和死亡人数。

SQL: SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1
问题: 对于死亡人数超过1人的风暴，其名称、活动日期和死亡人数是多少？

SQL: SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1
问题: 显示所有最大速度超过1000的风暴的平均和最大损害。

SQL: SELECT avg(damage_millions_USD) ,  max(damage_millions_USD) FROM storm WHERE max_speed  >  1000
问题: 对于最大速度超过1000的风暴，平均损失和最大损失是多少？

SQL: SELECT avg(damage_millions_USD) ,  max(damage_millions_USD) FROM storm WHERE max_speed  >  1000
问题: 对于最大速度大于平均速度的所有风暴，死亡和损害的总数是多少？

SQL: SELECT sum(number_deaths) ,  sum(damage_millions_USD) FROM storm WHERE max_speed  >  (SELECT avg(max_speed) FROM storm)
问题: 对于最大速度高于平均速度的风暴，返回总死亡人数和以百万计的总损失。

SQL: SELECT sum(number_deaths) ,  sum(damage_millions_USD) FROM storm WHERE max_speed  >  (SELECT avg(max_speed) FROM storm)
问题: 以最大速度降序，列出所有风暴的名称和损坏。

SQL: SELECT name ,  damage_millions_USD FROM storm ORDER BY max_speed DESC
问题: 按暴风雨最大速度降序排序，风暴的名称和以百万计的损失是什么？

SQL: SELECT name ,  damage_millions_USD FROM storm ORDER BY max_speed DESC
问题: 有多少地区受到影响？

SQL: SELECT count(DISTINCT region_id) FROM affected_region
问题: 计算不同受影响区域的数量。

SQL: SELECT count(DISTINCT region_id) FROM affected_region
问题: 显示未受影响区域的名称。

SQL: SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)
问题: 哪些地区没有受到影响？

SQL: SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)
问题: 显示区域名称和每个区域的风暴数量。

SQL: SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id
问题: 每一个地区发生了多少次风暴？

SQL: SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id
问题: 列出风暴的名称和每个风暴的受影响区域的数量。

SQL: SELECT T1.name ,  count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id
问题: 有多少地区受到每一次风暴的影响？

SQL: SELECT T1.name ,  count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id
问题: 影响最多区域的暴风雨的名称和最大速度是多少？

SQL: SELECT T1.name ,  T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1
问题: 返回影响最多地区的风暴的名称和最大速度。

SQL: SELECT T1.name ,  T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1
问题: 显示在记录中没有影响区域的风暴名称。

SQL: SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)
问题: 不影响任何地区的风暴名称是什么？

SQL: SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)
问题: 显示至少影响两个地区和10个城市的风暴名称。

SQL: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected)  >=  10
问题: 影响两个或更多地区并且影响总共10个或更多城市的风暴的名称是什么？

SQL: SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected)  >=  10
问题: 显示所有风暴名称，除了那些至少影响两个地区的。

SQL: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2
问题: 不影响两个或多个区域的风暴名称是什么？

SQL: SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2
问题: 受风暴影响死亡人数至少为10人的地区名称是什么？

SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T3.number_deaths  >=  10
问题: 返回受风暴影响的地区的名称，这些地区的死亡人数至少为10。

SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T3.number_deaths  >=  10
问题: 显示影响区域“丹麦”的所有风暴名称。

SQL: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.region_name  =  '丹麦'
问题: 影响“丹麦”的风暴名称是什么？

SQL: SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.region_name  =  '丹麦'
问题: 显示至少有两个风暴的区域名称。

SQL: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*)  >=  2
问题: 有两个或多个风暴的地区名称是什么？

SQL: SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*)  >=  2
问题: 找出那些受暴风雨影响而造成最多人死亡的地区的名字。

SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
问题: 受暴风雨影响死亡人数最多的地区叫什么名字？

SQL: SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
问题: 找出影响“阿富汗”和“阿尔巴尼亚”地区的风暴名称。

SQL: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  '阿富汗' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  '阿尔巴尼亚'
问题: 影响“阿富汗”和“阿尔巴尼亚”这两个地区的暴风雨的名称是什么？

SQL: SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  '阿富汗' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T2.Region_name  =  '阿尔巴尼亚'
问题: 总共有多少个县？

SQL: SELECT count(*) FROM county
问题: 统计县的总数。

SQL: SELECT count(*) FROM county
问题: 显示各县的县名和人口。

SQL: SELECT County_name ,  Population FROM county
问题: 每个县的名字和人口是多少？

SQL: SELECT County_name ,  Population FROM county
问题: 显示所有县的平均人口。

SQL: SELECT avg(Population) FROM county
问题: 平均来说，这些县的人口有多大？

SQL: SELECT avg(Population) FROM county
问题: 返回所有县的最大和最小人口。

SQL: SELECT max(Population) ,  min(Population) FROM county
问题: 县人口的最大和最小数是多少？

SQL: SELECT max(Population) ,  min(Population) FROM county
问题: 展示所有不同地区的选举。

SQL: SELECT DISTINCT District FROM election
问题: 有哪些不同的地区进行选举？

SQL: SELECT DISTINCT District FROM election
问题: 显示名字为“转塘”的县的邮政编码。

SQL: SELECT Zip_code FROM county WHERE County_name  =  "转塘"
问题: 那个叫“转塘”的县的邮政编码是什么？

SQL: SELECT Zip_code FROM county WHERE County_name  =  "转塘"
问题: 显示参选第1区的代表。

SQL: SELECT Delegate FROM election WHERE District  =  1
问题: 第1区的参选代表是谁？

SQL: SELECT Delegate FROM election WHERE District  =  1
问题: 显示选举的代表和委员会信息。

SQL: SELECT Delegate ,  Committee FROM election
问题: 每个选举记录的代表和委员会信息是什么？

SQL: SELECT Delegate ,  Committee FROM election
问题: 有多少不同的州长？

SQL: SELECT count(DISTINCT Governor) FROM party
问题: 计算不同的州长的人数。

SQL: SELECT count(DISTINCT Governor) FROM party
问题: 显示民主党的副州长和监查官。

SQL: SELECT Lieutenant_Governor ,  Comptroller FROM party WHERE Party  =  "民主"
问题: 民主党的副州长和监查官是谁？

SQL: SELECT Lieutenant_Governor ,  Comptroller FROM party WHERE Party  =  "民主"
问题: 哪些年州长叫“张梁”？

SQL: SELECT DISTINCT YEAR FROM party WHERE Governor  =  "张梁"
问题: 找出州长名字为“张梁”的不同年份。

SQL: SELECT DISTINCT YEAR FROM party WHERE Governor  =  "张梁"
问题: 显示所有关于选举的信息。

SQL: SELECT * FROM election
问题: 返回每个选举记录的所有信息。

SQL: SELECT * FROM election
问题: 显示代表和他们所属的县的名称。

SQL: SELECT T2.Delegate ,  T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District
问题: 每个县的代表和县的名称是什么？

SQL: SELECT T2.Delegate ,  T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District
问题: 哪些代表来自人口少于100000的县？

SQL: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  <  100000
问题: 找到来自人口低于100000的县的代表。

SQL: SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  <  100000
问题: 有多少不同的代表来自人口超过50000的县？

SQL: SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  >  50000
问题: 统计来自人口在50000人以上的县的不同代表人数。

SQL: SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  >  50000
问题: “拨款”委员会代表所属的县名是什么？

SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T2.Committee  =  "拨款"
问题: “拨款”委员会的代表属于哪个县？给我县的名字。

SQL: SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T2.Committee  =  "拨款"
问题: 显示代表和他们所属政党的名称。

SQL: SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID
问题: 对于每个代表，找到他们的政党的名称。

SQL: SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID
问题: 谁是与第1区的代表有关的政党的理事？

SQL: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1
问题: 查找与第1区的代表相关的政党。谁担任这些政党的理事？

SQL: SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1
问题: 与来自第一区或第二区的代表有联系的各党的监查官是谁？

SQL: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2
问题: 查找与第1区或第2区的代表相关的各党。谁担任这些政党的监查官？

SQL: SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2
问题: 返回有民主党代表的所有委员会。

SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "民主"
问题: 哪个委员会有民主党代表？

SQL: SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T2.Party  =  "民主"
问题: 显示每个县的名称以及相应代表人数。

SQL: SELECT T1.County_name ,  COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id
问题: 对于每个县，查找该县的名称和对应县的代表人数。

SQL: SELECT T1.County_name ,  COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id
问题: 显示每个政党的名称和来自该政党的代表的相应数量。

SQL: SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party
问题: 对于每个政党，返回政党的名字和对应政党的代表人数。

SQL: SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party
问题: 按人口顺序升序排序，返回所有县的名称。

SQL: SELECT County_name FROM county ORDER BY Population ASC
问题: 按人口升序给所有县的名称排序。

SQL: SELECT County_name FROM county ORDER BY Population ASC
问题: 返回按县名字母顺序降序排序的所有县名。

SQL: SELECT County_name FROM county ORDER BY County_name DESC
问题: 按字母顺序降序给所有县的名字排序。

SQL: SELECT County_name FROM county ORDER BY County_name DESC
问题: 显示人口最多的县的名字。

SQL: SELECT County_name FROM county ORDER BY Population DESC LIMIT 1