jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 显示保持天数超过50天的摔跤选手的淘汰次数。

SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID WHERE T2.Days_held  >  50
问题: 保持天数超过50的摔跤运动员的淘汰次数是多少？

SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID WHERE T2.Days_held  >  50
问题: 显示不同的淘汰赛队伍和每个队伍淘汰赛的数量。

SQL: SELECT Team ,  COUNT(*) FROM elimination GROUP BY Team
问题: 每个队有多少淘汰赛？

SQL: SELECT Team ,  COUNT(*) FROM elimination GROUP BY Team
问题: 展示超过三次被淘汰的队伍。

SQL: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3
问题: 哪支队伍有超过3次被淘汰？

SQL: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3
问题: 展示摔跤运动员的位置和保持天数。

SQL: SELECT Reign ,  Days_held FROM wrestler
问题: 所有摔跤运动员的统治和保持日子是怎样的？

SQL: SELECT Reign ,  Days_held FROM wrestler
问题: 保持不到100天的摔跤运动员名字？

SQL: SELECT Name FROM wrestler WHERE Days_held  <  100
问题: 返回保持少于100天的摔跤运动员的名字。

SQL: SELECT Name FROM wrestler WHERE Days_held  <  100
问题: 请展示统治最多的摔跤手。

SQL: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
问题: 摔跤运动员最常见的是哪个统治？

SQL: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出有两个摔跤手的位置。

SQL: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*)  >  2
问题: 哪些位置有两个摔跤运动员？

SQL: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*)  >  2
问题: 列出没有被淘汰的摔跤运动员的名字。

SQL: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
问题: 摔跤运动员的名字是什么？

SQL: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
问题: 展示那些既有被“大志”淘汰的摔跤选手，又有被“一龙”淘汰的摔跤选手的队伍。

SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "大志" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "一龙"
问题: 同时有被“大志”淘汰了和“一龙”淘汰了的摔跤选手的队伍都有哪些？

SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "大志" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "一龙"
问题: 不同的团队遭受淘汰的数量是多少？

SQL: SELECT COUNT (DISTINCT team) FROM elimination
问题: 有多少支不同的球队淘汰了摔跤手？

SQL: SELECT COUNT (DISTINCT team) FROM elimination
问题: 显示被“市明”或者“大志”淘汰的次数。

SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "市明" OR Eliminated_By  =  "大志"
问题: 被“市明”或者“大志”淘汰的淘汰次数是什么？

SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "市明" OR Eliminated_By  =  "大志"
问题: 有多少学校？

SQL: SELECT count(*) FROM school
问题: 统计学校的数量。

SQL: SELECT count(*) FROM school
问题: 按字母顺序显示所有学校的名字。

SQL: SELECT school_name FROM school ORDER BY school_name
问题: 列出所有学校的名字、地点、吉祥物。

SQL: SELECT school_name ,  LOCATION ,  mascot FROM school
问题: 所有学校的总共入学人数和平均入学人数是多少？

SQL: SELECT sum(enrollment) ,  avg(enrollment) FROM school
问题: 入学人数高于平均水平的学校的吉祥物是什么？

SQL: SELECT mascot FROM school WHERE enrollment  >  (SELECT avg(enrollment) FROM school)
问题: 列出入学人数最少的学校的名字。

SQL: SELECT school_name FROM school ORDER BY enrollment LIMIT 1
问题: 显示所有学校的平均、最大、最小入学人数。

SQL: SELECT avg(enrollment) ,  max(enrollment) ,  min(enrollment) FROM school
问题: 显示每个县学校数量和总入学人数。

SQL: SELECT county ,  count(*) ,  sum(enrollment) FROM school GROUP BY county
问题: 有多少捐赠者捐助名为“理工大学”的学校？

SQL: SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  "理工大学"
问题: 按照捐赠金额的下降顺序列出每个捐赠者的姓名和捐赠金额。

SQL: SELECT donator_name ,  sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
问题: 列出没有捐赠的学校的名字。

SQL: SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
问题: 列出所有捐赠金额小于或等于10的学校的名称。

SQL: SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount)  <=  10
问题: 展示捐助学校“理工大学”和“财经大学”的捐赠者的姓名。

SQL: SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  '理工大学' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  '财经大学'
问题: 除捐献金额小于9的捐赠者外，其他捐赠者的姓名。

SQL: SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount  <  9
问题: 列出数额最大的捐赠数和捐赠者的姓名。

SQL: SELECT amount ,  donator_name FROM endowment ORDER BY amount DESC LIMIT 1
问题: 在2001年或以前，有多少预算在3000以上？

SQL: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
问题: 计算2001年或以前预算额大于3000的预算数目。

SQL: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
问题: 显示2002年或之后每所学校的名称、预算金额以及投资金额。

SQL: SELECT T2.school_name ,  T1.budgeted ,  T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.year  >=  2002
问题: 显示所有捐赠者的姓名。

SQL: SELECT DISTINCT donator_name FROM endowment
问题: 多少预算记录的预算金额小于投资金额？

SQL: SELECT count(*) FROM budget WHERE budgeted  <  invested
问题: “理工大学”学校所有年的预算总额是多少？

SQL: SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  '理工大学'
问题: 显示预算总额大于100或捐赠总额大于10的学校的名称。

SQL: SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN endowment AS T3 ON T2.school_id  =  T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted)  >  100 OR sum(T3.amount)  >  10
问题: 查找有不止一个捐赠者捐赠超过8.5的学校的名称。

SQL: SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.amount  >  8.5 GROUP BY T1.school_id HAVING count(*)  >  1
问题: 查找有不止一个捐赠者少于8.5的学校的数量。

SQL: SELECT count(*) FROM (SELECT * FROM endowment WHERE amount  >  8.5 GROUP BY school_id HAVING count(*)  >  1)
问题: 按照投资预算额和预算总额的百分比排序，列出预算总额超过6000所或在2003年之前成立的学校的名称、IHSAA足球班和吉祥物。

SQL: SELECT T1.School_name ,  T1.Mascot ,  T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id  =  T2.school_id WHERE Budgeted  >  6000 OR YEAR  <  2003 ORDER BY T2.total_budget_percent_invested ,  T2.total_budget_percent_budgeted
问题: 那里有多少栋建筑？

SQL: SELECT count(*) FROM building
问题: 根据楼层数显示所有建筑物的名称、街道地址和楼层数。

SQL: SELECT name ,  street_address ,  floors FROM building ORDER BY floors
问题: 最高的建筑物叫什么名字？

SQL: SELECT name FROM building ORDER BY height_feet DESC LIMIT 1
问题: 所有建筑的平均、最大和最小楼层数是多少？

SQL: SELECT avg(floors) ,  max(floors) ,  min(floors) FROM building
问题: 显示高于平均高度或者楼层数高于平均的建筑物数量。

SQL: SELECT count(*) FROM building WHERE height_feet  >  (SELECT avg(height_feet) FROM building) OR floors  >  (SELECT avg(floors) FROM building)
问题: 列出高度至少200英尺以及楼层至少20层的建筑物的名称。

SQL: SELECT name FROM building WHERE height_feet  >=  200 AND floors  >=  20
问题: 显示1990年以后成立的、类型为“私立”的机构的名称和地点。

SQL: SELECT institution ,  LOCATION FROM institution WHERE founded  >  1990 AND TYPE  =  '私立'
问题: 显示机构类型，以及每种类型的机构的数量和总注册人数。

SQL: SELECT TYPE ,  count(*) ,  sum(enrollment) FROM institution GROUP BY TYPE
问题: 展示机构数量最多的机构类型。

SQL: SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
问题: 显示1990年后成立至少有1000个注册人数的机构的机构类型。

SQL: SELECT TYPE FROM institution WHERE founded  >  1990 AND enrollment  >=  1000
问题: 显示没有任何机构的建筑物名称。

SQL: SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution)
问题: 展示建筑名称，除了那些含有在2003成立的机构的。

SQL: SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  =  2003
问题: 对于每个建筑，显示建筑物的名称和其中的机构数量。

SQL: SELECT T1.name ,  count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id GROUP BY T1.building_id
问题: 展示在1880年后建立的至少有两个机构的建筑物的名称和高度。

SQL: SELECT T1.name ,  T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  >  1880 GROUP BY T1.building_id HAVING count(*)  >=  2
问题: 显示所有不同的机构类型。

SQL: SELECT DISTINCT TYPE FROM institution
问题: 显示机构名称以及每个机构的蛋白质数量。

SQL: SELECT T1.institution ,  count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id GROUP BY T1.institution_id
问题: 有多少蛋白质与1880年后建立的机构或具有“私立”类型的机构相关？

SQL: SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id WHERE T1.founded  >  1880 OR T1.type  =  '私立'
问题: 显示蛋白质名称和机构名称。

SQL: SELECT T2.protein_name ,  T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id
问题: 在至少20层楼的建筑中，有多少机构与蛋白质相关联？

SQL: SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id JOIN building AS T3 ON T3.building_id  =  T1.building_id WHERE T3.floors  >=  20
问题: 在我们的记录中没有蛋白质的相关机构有多少？

SQL: SELECT count(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein)
问题: 显示所有容量超过800电影院的位置。

SQL: SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity  >  800
问题: 展示所有在2010年和2011年开业的电影院。

SQL: SELECT LOCATION FROM cinema WHERE openning_year  =  2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year  =  2011
问题: 我们有多少电影院？

SQL: SELECT count(*) FROM cinema
问题: 数一数电影院的数量。

SQL: SELECT count(*) FROM cinema
问题: 显示每个影院的名称、开张年份和容量。

SQL: SELECT name ,  openning_year ,  capacity FROM cinema
问题: 显示容量高于平均水平的电影院的名称和位置。

SQL: SELECT name ,  LOCATION FROM cinema WHERE capacity  >  (SELECT avg(capacity) FROM cinema)
问题: 电影院的所有位置是什么？

SQL: SELECT DISTINCT LOCATION FROM cinema
问题: 找到有电影院的不同地点。

SQL: SELECT DISTINCT LOCATION FROM cinema
问题: 按开张年份降序，显示所有的电影名称和开张年份。

SQL: SELECT name ,  openning_year FROM cinema ORDER BY openning_year DESC
问题: 最大容量的电影院的名字和位置是什么？

SQL: SELECT name ,  LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1
问题: 显示2011年或之后所有开业的电影院的平均、最低和最大容量。

SQL: SELECT avg(capacity) ,  min(capacity) ,  max(capacity) FROM cinema WHERE openning_year  >=  2011
问题: 显示每个位置和对应电影院的数量。

SQL: SELECT LOCATION ,  count(*) FROM cinema GROUP BY LOCATION
问题: 2010年或以后电影院最多的位置是什么？

SQL: SELECT LOCATION FROM cinema WHERE openning_year  >=  2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1
问题: 显示所有至少有两个容量超过300的电影院的位置。

SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >=  2
问题: 哪些地方有2个或更多容量超过300的电影院？

SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >=  2
问题: 显示所有电影片名和导演。

SQL: SELECT title ,  directed_by FROM film
问题: 每部电影的片名和导演是什么？

SQL: SELECT title ,  directed_by FROM film
问题: 显示所有导演。

SQL: SELECT DISTINCT directed_by FROM film
问题: 所有导演是谁？

SQL: SELECT DISTINCT directed_by FROM film
问题: 列出所有导演和导演导演的电影数量。

SQL: SELECT directed_by ,  count(*) FROM film GROUP BY directed_by
问题: 每家影院每台DAT的显示次数是多少？

SQL: SELECT T2.name ,  sum(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id  =  T2.cinema_id GROUP BY T1.cinema_id
问题: 每部电影的片名和最高价格是多少？

SQL: SELECT T2.title ,  max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id
问题: 给我每个电影的片名和最高价格。

SQL: SELECT T2.title ,  max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id
问题: 按时间表显示电影院名称、电影片名、日期和价格。

SQL: SELECT T3.name ,  T2.title ,  T1.date ,  T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id JOIN cinema AS T3 ON T1.cinema_id  =  T3.cinema_id
问题: 没有时间表的电影的片名和导演是什么？

SQL: SELECT title ,  directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)
问题: 显示总共演出时间最多的导演。

SQL: SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1
问题: 找到有一个以上容量超过300的电影院的位置。

SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >  1
问题: 在哪些地方有不止一个电影院的容量超过300？

SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >  1
问题: 有多少电影片名里有“故事”？

SQL: SELECT count(*) FROM film WHERE title LIKE "故事"
问题: 计算标题包含“故事”的电影的数量。

SQL: SELECT count(*) FROM film WHERE title LIKE "故事"
问题: 顾客持500金额优惠券是好还是不好？

SQL: SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id  =  T2.coupon_id WHERE T2.coupon_amount  =  500
问题: 每个客户预订了多少次？列出客户ID、名字和数量。

SQL: SELECT T1.customer_id ,  T1.first_name ,  count(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id
问题: 顾客支付的最大总金额是多少？列出客户ID和数量。

SQL: SELECT customer_id ,  sum(amount_paid) FROM Payments GROUP BY customer_id ORDER BY sum(amount_paid) DESC LIMIT 1
问题: 支付次数最多的预订的ID和退款额是多少？

SQL: SELECT T1.booking_id ,  T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id  =  T2.booking_id GROUP BY T1.booking_id ORDER BY count(*) DESC LIMIT 1
问题: 预订3次的产品ID是什么？

SQL: SELECT product_id FROM products_booked GROUP BY product_id HAVING count(*)  =  3
问题: 预定数量为102.76的产品的描述是什么。

SQL: SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id  =  T2.product_id WHERE T1.booked_amount  =  102.76
问题: 预订了名为“书集”的产品的预订的开始日期和结束日期是什么？

SQL: SELECT T3.booking_start_date ,   T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id  =  T2.product_id JOIN bookings AS T3 ON T2.booking_id  =  T3.booking_id WHERE T1.product_name  =  '书集'
问题: 可用性等于1的产品名称是什么？

SQL: SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id  =  T2.product_id WHERE T1.available_yn  =  1
问题: 有多少种不同的产品类型？

SQL: SELECT count(DISTINCT product_type_code) FROM products_for_hire
问题: 所有“好”顾客的名字、姓氏和性别是什么？按姓氏排序。

SQL: SELECT first_name ,  last_name ,  gender_mf FROM customers WHERE good_or_bad_customer  =  '良好' ORDER BY last_name
问题: 所有付款的平均金额是多少？

SQL: SELECT avg(amount_due) FROM payments
问题: 预订的产品的最大、最小和平均预订数量是多少？

SQL: SELECT max(booked_count) ,  min(booked_count) ,  avg(booked_count) FROM products_booked
问题: 不同的支付类型有哪些？

SQL: SELECT DISTINCT payment_type_code FROM payments
问题: 以“书”为子字符串的产品的日租金是多少？

SQL: SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '书'
问题: 有多少产品的预定数量从没超过200？

SQL: SELECT count(*) FROM Products_for_hire WHERE product_id NOT IN ( SELECT product_id FROM products_booked WHERE booked_amount  >  200 )
问题: 好客户和坏客户拥有优惠券的优惠券金额是多少？

SQL: SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id  =  T2.coupon_id WHERE T2.good_or_bad_customer  =  '良好' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id  =  T2.coupon_id WHERE T2.good_or_bad_customer  =  '差'
问题: 支付金额高于300或付款类型是“现金”的付款日期。

SQL: SELECT payment_date FROM payments WHERE amount_paid  >  300 OR payment_type_code  =  '现金'
问题: 什么是“餐具”类型并且每日租金低于20产品的名称和描述？

SQL: SELECT product_name ,  product_description FROM products_for_hire WHERE product_type_code  =  '餐具' AND daily_hire_cost  <  20
问题: 有多少手机？

SQL: SELECT count(*) FROM phone
问题: 按价格升序列出手机名称。

SQL: SELECT Name FROM phone ORDER BY Price ASC
问题: 手机的内存和运营商是什么？

SQL: SELECT Memory_in_G ,  Carrier FROM phone
问题: 列出内存大于32的不同手机的运营商。

SQL: SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G  >  32
问题: 显示带有“中国联通”或“中国移动”的运营商的手机名称。

SQL: SELECT Name FROM phone WHERE Carrier  =  "中国联通" OR Carrier  =  "中国移动"
问题: 电话最贵的运营商是什么？

SQL: SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1
问题: 显示不同的电话运营商和每家运营商的手机总数。

SQL: SELECT Carrier ,  COUNT(*) FROM phone GROUP BY Carrier
问题: 显示手机使用频率最高的运营商。

SQL: SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示具有内存小于32的手机和内存大于64的手机的运营商。

SQL: SELECT Carrier FROM phone WHERE Memory_in_G  <  32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G  >  64
问题: 显示手机的名称和市场区域。

SQL: SELECT T3.Name ,  T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID  =  T3.Phone_ID
问题: 按照市场排名的上升顺序显示手机的名称和所在的市场区域。

SQL: SELECT T3.Name ,  T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID  =  T3.Phone_ID ORDER BY T2.Ranking
问题: 显示市场上有超过50家商店销售的手机的名称。

SQL: SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID  =  T3.Phone_ID WHERE T2.Num_of_shops  >  50
问题: 显示每种手机的名称和总库存量。

SQL: SELECT T2.Name ,  sum(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID  =  T2.Phone_ID GROUP BY T2.Name
问题: 显示总库存量大于2000的手机的名称，按总库存量的降序排列。

SQL: SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID  =  T2.Phone_ID GROUP BY T2.Name HAVING sum(T1.Num_of_stock)  >=  2000 ORDER BY sum(T1.Num_of_stock) DESC
问题: 列出任何市场上都不销售的手机的名称。

SQL: SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market)
问题: 有多少家天然气公司？

SQL: SELECT count(*) FROM company
问题: 公司的总数是多少？

SQL: SELECT count(*) FROM company
问题: 按照销售量递减顺序列出所有公司的名称和排名。

SQL: SELECT company ,  rank FROM company ORDER BY Sales_billion DESC
问题: 按销售额递减顺序订购的每家公司的名称和排名是什么？

SQL: SELECT company ,  rank FROM company ORDER BY Sales_billion DESC
问题: 显示所有总部不是来自美国的公司名称和主要行业。

SQL: SELECT company ,  main_industry FROM company WHERE headquarters != '美国'
问题: 总部没有设在美国的所有公司的公司和主要产业是什么？

SQL: SELECT company ,  main_industry FROM company WHERE headquarters != '美国'
问题: 按市场价值递减的顺序显示所有公司名称和总部。

SQL: SELECT company ,  headquarters FROM company ORDER BY market_value DESC
问题: 按市值下降排列的所有公司的名称和总部是什么？

SQL: SELECT company ,  headquarters FROM company ORDER BY market_value DESC
问题: 显示所有公司的最小、最大和平均市场价值。

SQL: SELECT min(market_value) ,  max(market_value) ,  avg(market_value) FROM company
问题: 每个公司的最小、最大和平均市场价值是多少？

SQL: SELECT min(market_value) ,  max(market_value) ,  avg(market_value) FROM company
问题: 显示所有公司的主要行业。

SQL: SELECT DISTINCT main_industry FROM company
问题: 所有公司的主要行业有是什么？

SQL: SELECT DISTINCT main_industry FROM company
问题: 列出所有总部及每个总部的公司数量。

SQL: SELECT headquarters ,  count(*) FROM company GROUP BY headquarters
问题: 每个总部的名称是什么且有多少公司集中在那里？

SQL: SELECT headquarters ,  count(*) FROM company GROUP BY headquarters
问题: 显示各行业的所有主要行业和总市值。

SQL: SELECT main_industry ,  sum(market_value) FROM company GROUP BY main_industry
问题: 每个行业的主要行业和总市值是多少？

SQL: SELECT main_industry ,  sum(market_value) FROM company GROUP BY main_industry
问题: 列出总市值最高的主要行业及其公司数量。

SQL: SELECT main_industry ,  count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1
问题: 具有最高市场价值的行业的公司总数是多少？

SQL: SELECT main_industry ,  count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1
问题: 显示在银行业中至少有两家公司的公司总部。

SQL: SELECT headquarters FROM company WHERE main_industry  =  '银行业' GROUP BY headquarters HAVING count(*)  >=  2
问题: 银行业中至少有两家公司的公司总部是什么？

SQL: SELECT headquarters FROM company WHERE main_industry  =  '银行业' GROUP BY headquarters HAVING count(*)  >=  2
问题: 按开业年份排列，显示所有加油站的ID、位置和经理名字。

SQL: SELECT station_id ,  LOCATION ,  manager_name FROM gas_station ORDER BY open_year
问题: 按开业年份排列，加油站ID、地点和经理姓名是什么？

SQL: SELECT station_id ,  LOCATION ,  manager_name FROM gas_station ORDER BY open_year
问题: 有多少加油站的开业年份在2000年到2005年之间？

SQL: SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005
问题: 2000至2005年间开业的加油站总数是多少？

SQL: SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005
问题: 按数目排序，显示所有地点和每个地点的加油站数量。

SQL: SELECT LOCATION ,  count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)
问题: 每一个地点有多少个加油站？，按数目排序。

SQL: SELECT LOCATION ,  count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)
问题: 显示所有有一家银行业公司和一家石油天然气公司的总部。

SQL: SELECT headquarters FROM company WHERE main_industry  =  '银行业' INTERSECT SELECT headquarters FROM company WHERE main_industry  =  '天然气'
问题: 在银行和石油天然气公司行业都有公司的总部是什么？

SQL: SELECT headquarters FROM company WHERE main_industry  =  '银行业' INTERSECT SELECT headquarters FROM company WHERE main_industry  =  '天然气'
问题: 在没有银行业的公司的总部。

SQL: SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry  =  '银行业'
问题: 没有银行业的公司的总部是什么？

SQL: SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry  =  '银行业'
问题: 显示公司名称与加油站的数量。

SQL: SELECT T2.company ,  count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id
问题: 对于每个公司ID，公司是什么以及每个公司运营多少个加油站？

SQL: SELECT T2.company ,  count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id
问题: 没有加油站的公司名称和主要行业。

SQL: SELECT company ,  main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)
问题: 没有加油站的公司的主要行业是什么？

SQL: SELECT company ,  main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)
问题: 显示埃克森美孚公司的加油站的经理的名字。

SQL: SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.company  =  '石化'
问题: 埃克森美孚公司经营的加油站经理的名字是什么？

SQL: SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.company  =  '石化'
问题: 显示所有市场价值大于100的公司的加油站所在的位置。

SQL: SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.market_value  >  100
问题: 所有市场价值大于100的公司的加油站所在的位置在什么地方？

SQL: SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.market_value  >  100
问题: 显示在2000年之后开业最多的加油站的经理姓名。

SQL: SELECT manager_name FROM gas_station WHERE open_year  >  2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1
问题: 2000年后开张最多的加油站的经理叫什么名字？

SQL: SELECT manager_name FROM gas_station WHERE open_year  >  2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1
问题: 按开业年份排列所有加油站的位置。

SQL: SELECT LOCATION FROM gas_station ORDER BY open_year
问题: 按开业年份排列的所有加油站的位置是什么？

SQL: SELECT LOCATION FROM gas_station ORDER BY open_year
问题: 按照这些公司的销售额和利润，找出它们在银行业公司中的排名、公司名称、市场价值。

SQL: SELECT rank ,  company ,  market_value FROM company WHERE main_industry  =  '银行业' ORDER BY sales_billion ,  profits_billion
问题: 按照销售和利润的顺序，银行业的每家公司的排名、公司和市场价值是多少？

SQL: SELECT rank ,  company ,  market_value FROM company WHERE main_industry  =  '银行业' ORDER BY sales_billion ,  profits_billion
问题: 查找资产额最高的3家公司拥有的加油站的位置和代表名称。

SQL: SELECT T3.location ,  T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3
问题: 资产规模最大的3家公司所拥有的加油站的地点和代表姓名是什么？

SQL: SELECT T3.location ,  T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3
问题: 我们有多少个地区？

SQL: SELECT count(*) FROM region
问题: 计算区域的数量。

SQL: SELECT count(*) FROM region
问题: 显示按标签排序的所有不同区域名称。

SQL: SELECT DISTINCT region_name FROM region ORDER BY Label
问题: 不同的地区名称是什么？

SQL: SELECT DISTINCT region_name FROM region ORDER BY Label
问题: 我们有多少个政党？

SQL: SELECT count(DISTINCT party_name) FROM party
问题: 统计不同政党的人数。

SQL: SELECT count(DISTINCT party_name) FROM party
问题: 按离任的时间，显示部长们的上任和离任的时间。

SQL: SELECT minister ,  took_office ,  left_office FROM party ORDER BY left_office
问题: 按离任时间排列的部长们的上任和离任的时间是什么？

SQL: SELECT minister ,  took_office ,  left_office FROM party ORDER BY left_office
问题: 显示1961年后或1959年之前就职的部长。

SQL: SELECT minister FROM party WHERE took_office  >  1961 OR took_office  <  1959
问题: 1961年前或1959年前就职的部长是谁？

SQL: SELECT minister FROM party WHERE took_office  >  1961 OR took_office  <  1959
问题: 显示所有不属于进步党的部长。

SQL: SELECT minister FROM party WHERE party_name != '进步党'
问题: 哪些部长不是进步党的一员？

SQL: SELECT minister FROM party WHERE party_name != '进步党'
问题: 按照上任时间的先后顺序显示所有部长和党派。

SQL: SELECT minister ,  party_name FROM party ORDER BY took_office DESC
问题: 按上任时间顺序排列的各党派的部长们分别是谁？他们属于哪个党派？

SQL: SELECT minister ,  party_name FROM party ORDER BY took_office DESC
问题: 返回最近离任的部长。

SQL: SELECT minister FROM party ORDER BY left_office DESC LIMIT 1
问题: 哪位部长最近离职？

SQL: SELECT minister FROM party ORDER BY left_office DESC LIMIT 1
问题: 列出成员名称和他们的党派名字。

SQL: SELECT T1.member_name ,  T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id
问题: 成员名字及其对应党派的姓名是什么？

SQL: SELECT T1.member_name ,  T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id
问题: 显示所有政党名称和党员人数。

SQL: SELECT T2.party_name ,  count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id
问题: 每个政党有多少成员？

SQL: SELECT T2.party_name ,  count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id