jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 找出收益大于“奥斯汀”一些公司收益的公司的总收益。

SQL: SELECT sum(revenue) FROM manufacturers WHERE revenue  >  (SELECT min(revenue) FROM manufacturers WHERE headquarter  =  '郑州')
问题: 收益高于在“奥斯汀”收益最低的制造商的所有公司的总收益是多少？

SQL: SELECT sum(revenue) FROM manufacturers WHERE revenue  >  (SELECT min(revenue) FROM manufacturers WHERE headquarter  =  '郑州')
问题: 找出每个创始人的公司总收益。

SQL: SELECT sum(revenue) ,  founder FROM manufacturers GROUP BY founder
问题: 每个创始人创办的公司的总收益是多少？

SQL: SELECT sum(revenue) ,  founder FROM manufacturers GROUP BY founder
问题: 找出每个城市收益最高的公司的名称和收益。

SQL: SELECT name ,  max(revenue) ,  Headquarter FROM manufacturers GROUP BY Headquarter
问题: 每个总部城市收益最高的公司的名称及其收益是多少？

SQL: SELECT name ,  max(revenue) ,  Headquarter FROM manufacturers GROUP BY Headquarter
问题: 找处每个制造商的总收益。

SQL: SELECT sum(revenue) ,  name FROM manufacturers GROUP BY name
问题: 每个制造商的总收益是多少？

SQL: SELECT sum(revenue) ,  name FROM manufacturers GROUP BY name
问题: 找出每个制造商的所有产品的平均价格，并列出每个公司的名称。

SQL: SELECT avg(T1.price) ,  T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.name
问题: 每个制造商的平均产品价格是多少？

SQL: SELECT avg(T1.price) ,  T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.name
问题: 找出不同总部城市的公司生产的不同产品的数量。

SQL: SELECT count(DISTINCT T1.name) ,  T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.Headquarter
问题: 每个总部城市生产多少种不同的产品？

SQL: SELECT count(DISTINCT T1.name) ,  T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.Headquarter
问题: 找出“索尼”不生产的产品的数量。

SQL: SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  '索尼')
问题: 有多少种产品不是“索尼”制造的？

SQL: SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  '索尼')
问题: 找出不做“DVD驱动器”的公司的名称。

SQL: SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T1.name  =  'DVD播放机'
问题: 不制作“DVD驱动器”的公司的名称是什么？

SQL: SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T1.name  =  'DVD播放机'
问题: 找出每个制造商的产品数量，显示每个公司的名称。

SQL: SELECT count(*) ,  T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.name
问题: 每个制造商找出多少产品？

SQL: SELECT count(*) ,  T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.name
问题: 选择店里所有产品的名称。

SQL: SELECT Name FROM Products
问题: 所有产品的名称是什么？

SQL: SELECT Name FROM Products
问题: 选择店里所有产品的名称和价格。

SQL: SELECT name ,  price FROM products
问题: 商店里所有产品的名称和价格是多少？

SQL: SELECT name ,  price FROM products
问题: 选择价格低于或等于200美元的产品名称。

SQL: SELECT name FROM products WHERE price  <=  200
问题: 价格最多是200的产品名称是什么？

SQL: SELECT name FROM products WHERE price  <=  200
问题: 找出所有价格在60到120美元之间的产品的所有信息，。

SQL: SELECT * FROM products WHERE price BETWEEN 60 AND 120
问题: 所有价格在60到120之间的产品的所有信息是什么？

SQL: SELECT * FROM products WHERE price BETWEEN 60 AND 120
问题: 计算所有产品的平均价格。

SQL: SELECT avg(price) FROM products
问题: 所有产品的平均价格是多少？

SQL: SELECT avg(price) FROM products
问题: 计算制造商代码为2的所有产品的平均价格。

SQL: SELECT avg(price) FROM products WHERE Manufacturer  =  2
问题: 制造商代码为2的产品的平均价格是多少？

SQL: SELECT avg(price) FROM products WHERE Manufacturer  =  2
问题: 计算价格大于或等于180美元的产品数量。

SQL: SELECT count(*) FROM products WHERE price >= 180
问题: 多少产品的价格至少有180？

SQL: SELECT count(*) FROM products WHERE price >= 180
问题: 选择所有价格大于或等于$180的产品的名称和价格，首先按价格（降序）排序，然后按名称（升序）排序。

SQL: SELECT name ,  price FROM products WHERE price  >=  180 ORDER BY price DESC ,  name ASC
问题: 根据价格下降及名称上升排序，价格至少为180的产品的名称和价格是什么？

SQL: SELECT name ,  price FROM products WHERE price  >=  180 ORDER BY price DESC ,  name ASC
问题: 从每个产品的制造商中选择所有产品数据。

SQL: SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code
问题: 所有的产品数据，以及每个产品的制造商是什么？

SQL: SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code
问题: 选择每个制造商产品的平均价格，只显示制造商的代码。

SQL: SELECT AVG(Price) ,  Manufacturer FROM Products GROUP BY Manufacturer
问题: 按制造商代码分组的产品平均价格是多少？

SQL: SELECT AVG(Price) ,  Manufacturer FROM Products GROUP BY Manufacturer
问题: 选择每个制造商产品的平均价格，显示制造商的名称。

SQL: SELECT avg(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name
问题: 按制造商名称分组的产品平均价格是多少？

SQL: SELECT avg(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name
问题: 选择产品平均价格高于或等于$150的制造商的名称。

SQL: SELECT avg(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150
问题: 产品平均成本在150或以上的制造商的产品名称和平均价格是多少？

SQL: SELECT avg(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150
问题: 选择最便宜产品的名称和价格。

SQL: SELECT name ,  price FROM Products ORDER BY price ASC LIMIT 1
问题: 最便宜的产品的名称和价格是多少？

SQL: SELECT name ,  price FROM Products ORDER BY price ASC LIMIT 1
问题: 选择每个制造商的名称及其最昂贵产品的名称和价格。

SQL: SELECT T1.Name ,  max(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name
问题: 对于每个制造商的名字，他们最贵的产品的名称和价格是什么？

SQL: SELECT T1.Name ,  max(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name
问题: 选择每个产品类别中最便宜的产品代码。

SQL: SELECT code ,  name ,  min(price) FROM products GROUP BY name
问题: 每个类别中最便宜的产品的代码和名称是什么？

SQL: SELECT code ,  name ,  min(price) FROM products GROUP BY name
问题: 最近创建的问题日志的ID是什么？

SQL: SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1
问题: 哪一个问题日志是最近创建的？把日志ID给我。

SQL: SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1
问题: 最老的日志ID和对应的问题ID是什么？

SQL: SELECT problem_log_id ,  problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
问题: 找出最老的日志ID及其对应的问题ID。

SQL: SELECT problem_log_id ,  problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
问题: 根据ID为10的问题找出所有日志的ID和日期。

SQL: SELECT problem_log_id ,  log_entry_date FROM problem_log WHERE problem_id = 10
问题: 对于ID为10的问题，返回其问题日志的ID和日期。

SQL: SELECT problem_log_id ,  log_entry_date FROM problem_log WHERE problem_id = 10
问题: 列出所有日志ID及其从问题日志中的描述。

SQL: SELECT problem_log_id ,  log_entry_description FROM problem_log
问题: 每个问题的日志ID和条目描述是什么？

SQL: SELECT problem_log_id ,  log_entry_description FROM problem_log
问题: 列出分配到id为1的问题的所有不同工作人员的名字和姓氏。

SQL: SELECT DISTINCT staff_first_name ,  staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1
问题: 哪些员工被分配到ID是1的问题？给我他们的名字和姓氏。

SQL: SELECT DISTINCT staff_first_name ,  staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1
问题: 列出分配给名为“马” “军军”的工作人员的问题id和日志id。

SQL: SELECT DISTINCT T2.problem_id ,  T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "马" AND T1.staff_last_name = "军军"
问题: 哪个问题ID和日志ID被指派给名为“马” “军军”的员工？

SQL: SELECT DISTINCT T2.problem_id ,  T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "马" AND T1.staff_last_name = "军军"
问题: “显示器”产品有多少问题？

SQL: SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "显示器"
问题: 被称为“显示器”的产品有多少问题被记录？

SQL: SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "显示器"
问题: 出问题最多的产品有多少问题？列出问题的数量和产品名称。

SQL: SELECT count(*) ,  T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1
问题: 哪种产品有最多数量的问题？给出问题数量和产品名称。

SQL: SELECT count(*) ,  T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1
问题: 请给出一个名字为“梁”的工作人员报告的问题的描述列表。

SQL: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "梁"
问题: 名字是“梁”的员工报告了哪些问题？显示问题的描述。

SQL: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "梁"
问题: 找出姓氏为“兰兰”的工作人员报告的问题的ID。

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "兰兰"
问题: 姓“兰兰”的员工报告了哪些问题？显示问题的ID。

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "兰兰"
问题: “1978-06-26”后报告的问题的ID是什么？

SQL: SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
问题: 找出“1978-06-26”后所报告问题的ID。

SQL: SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
问题: “1978-06-26”之前报告的问题的ID是什么？

SQL: SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"
问题: “1978-06-26”之前有哪些问题？把问题的ID告诉我。

SQL: SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"
问题: 对于每个有问题的产品，问题的数量和产品id是什么？

SQL: SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id
问题: 对于每个有问题的产品，列出问题的数量和产品id。

SQL: SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id
问题: 对于每个有问题的产品，查找“1986-11-13”之后报告的问题的数量和产品ID？

SQL: SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > "1986-11-13" GROUP BY T2.product_id
问题: 在“1986-11-13”之后有哪些产品出现了问题？给我产品ID和“1986-11-13”后报告的问题数。

SQL: SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > "1986-11-13" GROUP BY T2.product_id
问题: 按字母顺序列出所有不同产品名称的名称。

SQL: SELECT DISTINCT product_name FROM product ORDER BY product_name
问题: 按字母顺序排列所有的不同的产品名称。

SQL: SELECT DISTINCT product_name FROM product ORDER BY product_name
问题: 按产品ID排序列出所有不同的产品名称。

SQL: SELECT DISTINCT product_name FROM product ORDER BY product_id
问题: 用产品ID排序的不同产品名称列表是什么？

SQL: SELECT DISTINCT product_name FROM product ORDER BY product_id
问题: 名字为“李” “航”或“白” “博文”的工作人员报告的问题的ID是什么？

SQL: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "李" AND T2.staff_last_name = "航" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "白" AND T2.staff_last_name = "博文"
问题: “李” “航”或“白” “博文”的工作人员报告了哪些问题？给出问题的ID。

SQL: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "李" AND T2.staff_last_name = "航" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "白" AND T2.staff_last_name = "博文"
问题: 对于“梁” “天一”报告的由“李红” “军”授权关闭的问题的产品标识是什么？

SQL: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "梁" AND T2.staff_last_name = "天一" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "李红" AND T2.staff_last_name = "军"
问题: “梁” “天一”报告了哪些产品的问题被“李红” “军”授权关闭？返回产品的ID。

SQL: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "梁" AND T2.staff_last_name = "天一" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "李红" AND T2.staff_last_name = "军"
问题: 在“严” “冰”报告的任何问题发生之前报告的问题的ID是什么？

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  <  ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "严" AND T4.staff_last_name = "冰" )
问题: 在工作人员“严” “冰”报告任何问题的日期之前，报告了哪些问题？把问题的ID告诉我。

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  <  ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "严" AND T4.staff_last_name = "冰" )
问题: 在“马” “军军”报告的问题之后报告的问题的ID是什么？

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  >  ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "马" AND T4.staff_last_name = "军军" )
问题: 找出在“马” “军军”员工报告的任何问题日期之后报告的问题的ID。

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  >  ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "马" AND T4.staff_last_name = "军军" )
问题: 找出问题数量最多的3个产品。

SQL: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3
问题: 哪三种产品有最多的问题？

SQL: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3
问题: 列出1995年以后报告的产品“显示器”中问题的ID？

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = "显示器" AND T1.date_problem_reported > "1995"
问题: 在1995年以后报告了产品名字是“显示器”相关问题的id是什么？

SQL: SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = "显示器" AND T1.date_problem_reported > "1995"
问题: 找到那些从产品“内存”而不是“硬盘”报告问题的员工的名字和姓氏？

SQL: SELECT T3.staff_first_name ,  T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "内存" EXCEPT SELECT T3.staff_first_name ,  T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "硬盘"
问题: 哪些员工报告“内存”产品而不是“硬盘”产品的问题？给出他们的名字和姓氏。

SQL: SELECT T3.staff_first_name ,  T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "内存" EXCEPT SELECT T3.staff_first_name ,  T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "硬盘"
问题: 找出“刘” “兰兰”和“王” “平之”都报告有问题的产品

SQL: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "刘" AND T3.staff_last_name = "兰兰" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "王" AND T3.staff_last_name = "平之"
问题: “刘” “兰兰”和员工“王” “平之”报告有问题的产品是哪些？

SQL: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "刘" AND T3.staff_last_name = "兰兰" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "王" AND T3.staff_last_name = "平之"
问题: 有多少分支机构的会员人数超过平均数？

SQL: SELECT count(*) FROM branch WHERE membership_amount  >  (SELECT avg(membership_amount) FROM branch)
问题: 有多少分支机构的成员数超过了平均数？

SQL: SELECT count(*) FROM branch WHERE membership_amount  >  (SELECT avg(membership_amount) FROM branch)
问题: 按开业年份分列出所有分行名称、地址、道路和城市。

SQL: SELECT name ,  address_road ,  city FROM branch ORDER BY open_year
问题: 按开业年份排序的分行的名称、地址道路和城市是什么？

SQL: SELECT name ,  address_road ,  city FROM branch ORDER BY open_year
问题: 会员人数最多的三大分支机构是什么？

SQL: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3
问题: 拥有前三多会员人数的分支机构的名称是什么？

SQL: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3
问题: 显示所有具有至少100个会员人数的分支机构所在的城市。

SQL: SELECT DISTINCT city FROM branch WHERE membership_amount  >=  100
问题: 哪些城市拥有超过100个会员资格？

SQL: SELECT DISTINCT city FROM branch WHERE membership_amount  >=  100
问题: 列出至少两个商店开业的所有营业年。

SQL: SELECT open_year FROM branch GROUP BY open_year HAVING count(*)  >=  2
问题: 开店时间至少有两个的营业年有哪些？

SQL: SELECT open_year FROM branch GROUP BY open_year HAVING count(*)  >=  2
问题: 显示2011年开业或位于"北京"的所有分行的最低和最高会员数量。

SQL: SELECT min(membership_amount) ,  max(membership_amount) FROM branch WHERE open_year  =  2011 OR city  =  '北京'
问题: 2011年开业或位于"北京"的所有分行的最低和最高会员人数是多少？

SQL: SELECT min(membership_amount) ,  max(membership_amount) FROM branch WHERE open_year  =  2011 OR city  =  '北京'
问题: 显示每个城市在2010年开放的每个分支机构的数量。

SQL: SELECT city ,  count(*) FROM branch WHERE open_year  <  2010 GROUP BY city
问题: 每一个城市，有多少分支机构在2010年之前开放？

SQL: SELECT city ,  count(*) FROM branch WHERE open_year  <  2010 GROUP BY city
问题: 会员有多少不同级别？

SQL: SELECT count(DISTINCT LEVEL) FROM member
问题: 不同的会员级别有哪些？

SQL: SELECT count(DISTINCT LEVEL) FROM member
问题: 按照级别的降序显示所有成员的卡号、姓名和家乡。

SQL: SELECT card_number ,  name ,  hometown FROM member ORDER BY LEVEL DESC
问题: 按降序排列的每个会员的卡号、姓名和家乡是什么？

SQL: SELECT card_number ,  name ,  hometown FROM member ORDER BY LEVEL DESC
问题: 显示成员数量最多的会员级别。

SQL: SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1
问题: 人数最多的会员等级是什么？

SQL: SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1
问题: 按注册年份排序显示所有成员名字和的注册分支名称。

SQL: SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year
问题: 按注册年份排序的注册会员和分支机构的名称是什么？

SQL: SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year
问题: 显示所有分支名称以及2015年后每个分支注册的成员数量。

SQL: SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id
问题: 对于每个分支ID，2015年以后登记的分支名称是什么？

SQL: SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id
问题: 显示没有任何注册分支的成员名称。

SQL: SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)
问题: 那些从未在任何分支注册过的会员的名字是什么？

SQL: SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)
问题: 列出没有任何注册会员的分支机构名称和城市。

SQL: SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)
问题: 没有注册会员的分支机构的名字和城市有哪些？

SQL: SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)
问题: 2016年注册会员最多的分公司的名称和开业年限是什么？

SQL: SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1
问题: 2016年注册会员人数最多的分支机构名字和其开业的年限是什么？

SQL: SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1
问题: 在2016年显示注册的分支机构的成员名字和故乡。

SQL: SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016
问题: 2016年在一个分支机构注册的会员名称和家乡名称是什么？

SQL: SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016
问题: 显示所有城市在2001年开设的分支机构，以及超过100个会员的分支机构。

SQL: SELECT city FROM branch WHERE open_year  =  2001 AND membership_amount  >  100
问题: 哪些城市在2001年开设了分支机构且有100多名会员？

SQL: SELECT city FROM branch WHERE open_year  =  2001 AND membership_amount  >  100
问题: 显示所有没有超过100个会员的分支机构所在的城市。

SQL: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100
问题: 哪些城市没有超过100个成员的分支机构？

SQL: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100
问题: 2018年“北京”所有分行的总购买金额是多少？

SQL: SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.city  =  '北京' AND T1.year  =  2018
问题: 2018年度“北京”分行总共购买了英镑的金额是多少？

SQL: SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.city  =  '北京' AND T1.year  =  2018
问题: 6级会员的购买总额是多少？

SQL: SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6
问题: 6级成员的总购买量是多少？

SQL: SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6
问题: 找出有会员的家乡在“苏州，江苏”和“泉州，福建”的分支机构的名称。

SQL: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  '苏州，江苏' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  '泉州，福建'
问题: 那些有会员的家乡在“苏州，江苏”和“泉州，福建”的分支机构叫什么名字？

SQL: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  '苏州，江苏' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  '泉州，福建'
问题: 列出其家乡地址包含“肯塔基”一词的所有会员的卡号。

SQL: SELECT card_number FROM member WHERE Hometown LIKE "西安"
问题: 来自“肯塔基”的会员卡的号码是多少？

SQL: SELECT card_number FROM member WHERE Hometown LIKE "西安"
问题: 找出学生总数。

SQL: SELECT count(*) FROM STUDENT
问题: 总共有多少学生？

SQL: SELECT count(*) FROM STUDENT
问题: 找出投票记录的总数。

SQL: SELECT count(*) FROM VOTING_RECORD
问题: 我们有多少投票记录？

SQL: SELECT count(*) FROM VOTING_RECORD
问题: 找到不同数量的主席选票。

SQL: SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD
问题: 有多少主席选票被记录下来？

SQL: SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD
问题: 找出所有学生的最大年龄。

SQL: SELECT max(Age) FROM STUDENT
问题: 学生中最大的年龄是多少？

SQL: SELECT max(Age) FROM STUDENT
问题: 找出主修课程50的学生姓氏。

SQL: SELECT LName FROM STUDENT WHERE Major  =  50
问题: 主修课程50的学生的姓氏是什么？

SQL: SELECT LName FROM STUDENT WHERE Major  =  50
问题: 找到22岁以上学生的名字。

SQL: SELECT Fname FROM STUDENT WHERE Age  >  22
问题: 22岁以上的学生的名字是什么？

SQL: SELECT Fname FROM STUDENT WHERE Age  >  22
问题: 性别是“男”的学生的专业是什么？

SQL: SELECT Major FROM STUDENT WHERE Sex  =  "男"
问题: 列出每个性别是"男性"学生的专业。

SQL: SELECT Major FROM STUDENT WHERE Sex  =  "男"
问题: 女性的平均年龄（性别为“女性”）是多少？

SQL: SELECT avg(Age) FROM STUDENT WHERE Sex  =  "F"
问题: 找到女学生的平均年龄。

SQL: SELECT avg(Age) FROM STUDENT WHERE Sex  =  "F"
问题: 主修课程600的学生的最大年龄和最小年龄是多少？

SQL: SELECT max(Age) ,  min(Age) FROM STUDENT WHERE Major  =  600
问题: 给出年龄最大的和最年轻的学习专业600的学生。

SQL: SELECT max(Age) ,  min(Age) FROM STUDENT WHERE Major  =  600
问题: 谁是生活在城市编号为“武汉”的城市的学生的导师？

SQL: SELECT Advisor FROM STUDENT WHERE city_code  =  "武汉"
问题: 显示居住城市代码是“武汉”的城市的学生的导师。

SQL: SELECT Advisor FROM STUDENT WHERE city_code  =  "武汉"
问题: 在“秋季”选举周期中有哪些不同的秘书选票？

SQL: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "秋季"
问题: 返回“秋季”选举周期中所有不同的秘书选票。

SQL: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "秋季"
问题: 在“08/30/2015”不同的主席投票有哪些？

SQL: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date  =  "08/30/2015"
问题: 显示所有在在“08/30/2015”的不同的主席选票。

SQL: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date  =  "08/30/2015"