jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 找到“丹丹”或“丽丽”的朋友的姓名和年龄。

SQL: SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '丹丹' OR T2.friend  =  '丽丽'
问题: “丹丹”的朋友或者“丽丽”的朋友的姓名和年龄是多少？

SQL: SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '丹丹' OR T2.friend  =  '丽丽'
问题: 找出拥有年龄在40岁以上和30岁以下的朋友的人的姓名。

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
问题: 每个有40岁以上和30岁以下的朋友的人的名字是什么？

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
问题: 找出有年龄在40岁以上但不在30岁以下的朋友的人的名字。

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
问题: 有年龄在40岁以上但不在30岁以下的朋友的人的名字是什么？

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
问题: 找到没有“学生”朋友的人的名字。

SQL: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.job  =  '学生'
问题: 没有“学生”朋友的名字是什么？

SQL: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.job  =  '学生'
问题: 找出正好有一个朋友的人。

SQL: SELECT name FROM PersonFriend GROUP BY name HAVING count(*)  =  1
问题: 正好有一个朋友的人的名字是什么？

SQL: SELECT name FROM PersonFriend GROUP BY name HAVING count(*)  =  1
问题: 谁是“张波”的朋友？

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  '张波'
问题: “张波”的朋友是谁？

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  '张波'
问题: 找到和“张波”交朋友的人的名字。

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '张波'
问题: “张波”的所有朋友的名字是什么？

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '张波'
问题: 找到和“仲景”交朋友的“女”的名字

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '仲景' AND T1.gender  =  '女'
问题: 所有和“仲景”交朋友的“女”的名字是什么？

SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '仲景' AND T1.gender  =  '女'
问题: 找到“丽丽”的“女”朋友。

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '女'
问题: “丽丽”的“女”朋友是什么？

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '女'
问题: 找到“丽丽”的工作是“医生”的“男”朋友？

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '男' AND T1.job  =  '医生'
问题: 谁是“丽丽”的“医生”朋友？

SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '男' AND T1.job  =  '医生'
问题: 谁有一个来自“上海”的朋友？

SQL: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  '上海'
问题: 来自“上海”的所有朋友的名字是什么？

SQL: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  '上海'
问题: 谁有比平均年龄小的朋友？

SQL: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  <  (SELECT avg(age) FROM person)
问题: 比所有朋友中平均年龄小的朋友的不同名字是什么？

SQL: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  <  (SELECT avg(age) FROM person)
问题: 谁有比平均年龄大的朋友？给出他们的朋友和他们的年龄

SQL: SELECT DISTINCT T2.name ,  T2.friend ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  >  (SELECT avg(age) FROM person)
问题: 所有比平均年龄大的人的姓名、朋友和年龄是什么？

SQL: SELECT DISTINCT T2.name ,  T2.friend ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  >  (SELECT avg(age) FROM person)
问题: 谁是“仲景”关系最长的朋友？

SQL: SELECT friend FROM PersonFriend WHERE name =  '仲景' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
问题: “仲景”与哪位朋友有最长久的友谊？

SQL: SELECT friend FROM PersonFriend WHERE name =  '仲景' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
问题: “仲景”关系最长的朋友的年龄是什么？

SQL: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name =  '仲景' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
问题: 与“仲景”相处时间最长的朋友的年龄是多少？

SQL: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name =  '仲景' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
问题: 找出与“丽丽”成为朋友时间最短的人的名字。

SQL: SELECT name FROM PersonFriend WHERE friend =  '丽丽' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
问题: 和“丽丽”交朋友时间最短的人叫什么名字？

SQL: SELECT name FROM PersonFriend WHERE friend =  '丽丽' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
问题: 找出和“丽丽”交往最久的人的姓名、年龄和工作头衔。

SQL: SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  '丽丽' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
问题: 与“丽丽”交最长时间朋友的姓名、年龄和工作是什么？

SQL: SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  '丽丽' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
问题: 没有朋友的人是谁？

SQL: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
问题: 没有朋友的人的名字是什么？

SQL: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
问题: 朋友的平均年龄最大的人是哪位？

SQL: SELECT T2.name ,  avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1
问题: 朋友平均年龄最大的人叫什么名字？平均年龄是多少？

SQL: SELECT T2.name ,  avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1
问题: 没有朋友住在“郑州”市的总人数是多少？

SQL: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  '郑州')
问题: 在“郑州”没有朋友的人的总数是多少？

SQL: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  '郑州')
问题: 找到“丽丽”的朋友。

SQL: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  '丽丽' AND T4.name != '丽丽'
问题: “丽丽”的朋友们的名字是什么？

SQL: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  '丽丽' AND T4.name != '丽丽'
问题: 有多少名成员？

SQL: SELECT count(*) FROM member
问题: 按字母升序顺序列出成员的名字。

SQL: SELECT Name FROM member ORDER BY Name ASC
问题: 成员的名字和国家是什么？

SQL: SELECT Name ,  Country FROM member
问题: 显示国家“美国”或“加拿大”的成员的名字。

SQL: SELECT Name FROM member WHERE Country  =  "美国" OR Country  =  "加拿大"
问题: 显示不同的国家和每个国家成员的数量。

SQL: SELECT Country ,  COUNT(*) FROM member GROUP BY Country
问题: 显示成员间最常见的国家。

SQL: SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪些国家有两个以上成员？

SQL: SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2
问题: 显示大学的领导姓名和地点。

SQL: SELECT Leader_Name ,  College_Location FROM college
问题: 显示会员的姓名和他们入学大学名称。

SQL: SELECT T2.Name ,  T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID
问题: 按照会员名字升序的字母顺序，显示会员姓名和他们所去大学的位置。

SQL: SELECT T2.Name ,  T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
问题: 显示与来自国家“加拿大”的成员相关的大学的不同领导者的名字。

SQL: SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "加拿大"
问题: 显示成员的姓名和装饰主题。

SQL: SELECT T1.Name ,  T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID
问题: 显示在轮次中具有高于等级3的成员的姓名。

SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  >  3
问题: 在轮次中以升序排列成员的姓名。

SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC
问题: 列出没有参加任何回合的成员的姓名。

SQL: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)
问题: 按照文档名称的字母顺序查找所有文档的名称和访问次数。

SQL: SELECT document_name ,  access_count FROM documents ORDER BY document_name
问题: 按照文档名称的字母顺序排序的所有文档的名称和访问次数是什么？

SQL: SELECT document_name ,  access_count FROM documents ORDER BY document_name
问题: 找出被访问次数最多的文档的名称以及其被访问的次数是多少？

SQL: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
问题: 被访问次数最多的文档的名称以及被访问次数是多少？

SQL: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
问题: 查找具有超过4个文档的文档类型。

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
问题: 超过4个文档的文档类型的编码是什么？

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
问题: 找出最流行的文档类型中所有文档的总访问计数。

SQL: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
问题: 最常见文档类型的文档的总访问次数是多少？

SQL: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
问题: 文件的平均访问次数是多少？

SQL: SELECT avg(access_count) FROM documents
问题: 查找所有文件的平均访问次数。

SQL: SELECT avg(access_count) FROM documents
问题: 访问次数最少的文档的结构是什么？

SQL: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code  =  t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1
问题: 返回被访问次数最少的文档的结构描述。

SQL: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code  =  t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1
问题: 名为“张伟的简历”的文档的文件类型是什么？

SQL: SELECT document_type_code FROM documents WHERE document_name  =  "张伟的简历"
问题: 返回名为“张伟的简历”的文档的类型代码。

SQL: SELECT document_type_code FROM documents WHERE document_name  =  "张伟的简历"
问题: 查找既属于最流行的三种类型之一又具有最流行的三种结构之一的文档列表。

SQL: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3
问题: 具有三种最常见类型之一和三种最常见结构之一的文档的名称是什么？

SQL: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3
问题: 什么文档类型拥有超过10000的总访问量。

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
问题: 返回总访问计数不超过10000的文档类型的代码。

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
问题: 名为“张伟的简历”的文件的所有章节标题是什么？

SQL: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "张伟的简历"
问题: 给出名字是“张伟的简历”的文档的章节标题。

SQL: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "张伟的简历"
问题: 查找所有文件中无任何章节的文件的名称。

SQL: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
问题: 没有任何章节的文件的名称是什么？

SQL: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
问题: 列出最受欢迎角色的用户所有的用户名和密码。

SQL: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
问题: 用户最常用的角色的用户名和密码是什么？

SQL: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
问题: 查找具有功能区域“致谢”的文档的平均访问次数。

SQL: SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code  =  t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code  =  t3.functional_area_code WHERE t3.functional_area_description  =  "致谢"
问题: 功能区域描述为“致谢”的文档的平均访问次数是多少？

SQL: SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code  =  t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code  =  t3.functional_area_code WHERE t3.functional_area_description  =  "致谢"
问题: 查找没有任何图像的文档的名称。

SQL: SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code JOIN document_sections_images AS t3 ON t2.section_id  =  t3.section_id
问题: 没有任何图像的文档的名称是什么？

SQL: SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code JOIN document_sections_images AS t3 ON t2.section_id  =  t3.section_id
问题: 拥有最多章节数的文档的名字是什么？

SQL: SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1
问题: 返回拥有最多章节数的文档的名字。

SQL: SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1
问题: 列出包含“CV”的所有文档的名称。

SQL: SELECT document_name FROM documents WHERE document_name LIKE "简历"
问题: 包含子字符串“CV”的文档的名称是什么？

SQL: SELECT document_name FROM documents WHERE document_name LIKE "简历"
问题: 有多少用户曾登录过？

SQL: SELECT count(*) FROM users WHERE user_login  =  1
问题: 计算登录的用户数。

SQL: SELECT count(*) FROM users WHERE user_login  =  1
问题: 查找已登录的用户中最流行的角色的描述。

SQL: SELECT role_description FROM ROLES WHERE role_code  =  (SELECT role_code FROM users WHERE user_login  =  1 GROUP BY role_code ORDER BY count(*) DESC LIMIT 1)
问题: 在已经登录的用户中，最流行的角色描述是什么？

SQL: SELECT role_description FROM ROLES WHERE role_code  =  (SELECT role_code FROM users WHERE user_login  =  1 GROUP BY role_code ORDER BY count(*) DESC LIMIT 1)
问题: 查找具有最不流行结构的文档的平均访问计数。

SQL: SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1
问题: 具有最不常用结构的文档的平均访问计数是多少？

SQL: SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1
问题: 按名称的顺序列出所有的图像名称和URL。

SQL: SELECT image_name ,  image_url FROM images ORDER BY image_name
问题: 按字母顺序排列的图像名称和URL是什么？

SQL: SELECT image_name ,  image_url FROM images ORDER BY image_name
问题: 查找每个角色中的用户数。

SQL: SELECT count(*) ,  role_code FROM users GROUP BY role_code
问题: 用户的角色代码有哪些，每个用户有多少个？

SQL: SELECT count(*) ,  role_code FROM users GROUP BY role_code
问题: 哪些文档类型有超过2个对应的文档？

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  2
问题: 给出具有超过2个对应文档的文档类型的代码。

SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  2
问题: 有多少家公司？

SQL: SELECT count(*) FROM Companies
问题: 统计公司的数量。

SQL: SELECT count(*) FROM Companies
问题: 以市场价值递减的顺序列出公司名称。

SQL: SELECT name FROM Companies ORDER BY Market_Value_billion DESC
问题: 按公司市场价值的降序对公司名称进行排序。

SQL: SELECT name FROM Companies ORDER BY Market_Value_billion DESC
问题: 总部不是“中国”的公司名称是什么？

SQL: SELECT name FROM Companies WHERE Headquarters != '中国'
问题: 找出总部不在“中国”的公司名称。

SQL: SELECT name FROM Companies WHERE Headquarters != '中国'
问题: 按公司名称升序排列的每个公司的名称和资产是什么？

SQL: SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC
问题: 按公司名称的升序排列各公司的名称和资产。

SQL: SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC
问题: 公司的平均利润是多少？

SQL: SELECT avg(Profits_billion) FROM Companies
问题: 计算公司的平均利润。

SQL: SELECT avg(Profits_billion) FROM Companies
问题: 那些行业不是“银行业”的公司的最高销售额和最低销售额是多少？

SQL: SELECT max(Sales_billion) ,  min(Sales_billion) FROM Companies WHERE Industry != "银行业"
问题: 找出不在“银行业”行业的公司的最大和最小销售额。

SQL: SELECT max(Sales_billion) ,  min(Sales_billion) FROM Companies WHERE Industry != "银行业"
问题: 公司有多少不同的行业？

SQL: SELECT count(DISTINCT Industry) FROM Companies
问题: 统计公司的不同行业数量。

SQL: SELECT count(DISTINCT Industry) FROM Companies
问题: 以建筑物高度降序列出建筑物名称。

SQL: SELECT name FROM buildings ORDER BY Height DESC
问题: 建筑高度按降序排列的建筑物名称是什么？

SQL: SELECT name FROM buildings ORDER BY Height DESC
问题: 找出最大高度的建筑物的故事。

SQL: SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1
问题: 最高建筑物的故事是什么？

SQL: SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1
问题: 列出办公室所在建筑物的名称以及公司的名称。

SQL: SELECT T3.name ,  T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id
问题: 对于每个公司，返回其办公室所在的建筑物的名称和公司名称。

SQL: SELECT T3.name ,  T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id
问题: 显示有超过一个公司办公室的建筑物的名称。

SQL: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id GROUP BY T1.building_id HAVING COUNT(*)  >  1
问题: 哪些建筑物有一个以上的公司办公室？给出建筑物名称。

SQL: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id GROUP BY T1.building_id HAVING COUNT(*)  >  1
问题: 显示拥有公司办公室最多的建筑的名称。

SQL: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪家公司拥有最多的公司办公室？给出建筑物名称。

SQL: SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1
问题: 请按楼层升序列出“值班”状态的建筑物的名称。

SQL: SELECT name FROM buildings WHERE Status  =  "值班" ORDER BY Stories ASC
问题: 找出处于“值班”状态的建筑物的名称，并按照建筑物层级的升序对其进行排序。

SQL: SELECT name FROM buildings WHERE Status  =  "值班" ORDER BY Stories ASC
问题: 请显示每个行业的名称以及该行业相应的公司数量。

SQL: SELECT Industry ,  COUNT(*) FROM Companies GROUP BY Industry
问题: 每个行业的名称和每个行业中对应的公司数量是什么？

SQL: SELECT Industry ,  COUNT(*) FROM Companies GROUP BY Industry
问题: 请按照公司数量的降序显示公司的行业。

SQL: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC
问题: 按每个行业的公司数量的降序对所有行业进行排序

SQL: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC
问题: 列出大多数公司共享的行业。

SQL: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1
问题: 哪个行业有最多的公司？

SQL: SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出没有公司办公室的建筑名称。

SQL: SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)
问题: 哪些建筑物没有公司的办公室？给出建筑的名称。

SQL: SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)
问题: 显示总部设在“中国”的公司和总部设在“中国”的公司所共有的行业。

SQL: SELECT Industry FROM Companies WHERE Headquarters  =  "中国" INTERSECT SELECT Industry FROM Companies WHERE Headquarters  =  "中国"
问题: 总部设在“中国”的公司和总部设在“中国”的公司所共有的行业是那些？

SQL: SELECT Industry FROM Companies WHERE Headquarters  =  "中国" INTERSECT SELECT Industry FROM Companies WHERE Headquarters  =  "中国"
问题: 找出其行业是“银行业”或“综合”的公司。

SQL: SELECT count(*) FROM Companies WHERE Industry  =  "银行业" OR Industry  =  "综合"
问题: 行业是“银行业”或“综合”的公司有多少家？

SQL: SELECT count(*) FROM Companies WHERE Industry  =  "银行业" OR Industry  =  "综合"
问题: 显示超过两家公司所共享的总部地点。

SQL: SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*)  >  2
问题: 那个总部位置被超过2家公司所共享？

SQL: SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*)  >  2
问题: 有多少产品？

SQL: SELECT count(*) FROM Products
问题: 按价格升序列出产品名称。

SQL: SELECT Product_Name FROM Products ORDER BY Product_Price ASC
问题: 产品名称和型号代码是什么？

SQL: SELECT Product_Name ,  Product_Type_Code FROM Products
问题: 名字是“快餐”或“交易守则”的产品的价格。

SQL: SELECT Product_Price FROM Products WHERE Product_Name  =  "快餐" OR Product_Name  =  "交易守则"
问题: 产品的平均价格是多少？

SQL: SELECT avg(Product_Price) FROM Products
问题: 价格最高的产品叫什么名字？

SQL: SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1
问题: 显示不同的产品类型代码以及每个类型代码的产品数量。

SQL: SELECT Product_Type_Code ,  COUNT(*) FROM Products GROUP BY Product_Type_Code
问题: 显示跨产品间最常见类型代码。

SQL: SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示具有至少两个产品的产品类型代码。

SQL: SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*)  >=  2
问题: 展示产品价格高于4500和产品价格低于3000的产品型号代码。

SQL: SELECT Product_Type_Code FROM Products WHERE Product_Price  >  4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price  <  3000
问题: 显示产品的名称和事件的数量。

SQL: SELECT T1.Product_Name ,  COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name
问题: 按照事件的数量按降序排序显示产品的名称和它们对应的事件数量。

SQL: SELECT T1.Product_Name ,  COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC
问题: 显示至少有两个事件中的产品名称。

SQL: SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*)  >=  2
问题: 按照产品名称字母升序显示至少包含两个事件中的产品名称。

SQL: SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*)  >=  2 ORDER BY T1.Product_Name
问题: 列出没有任何事件的产品名称。

SQL: SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events)
问题: 有多少艺术品？

SQL: SELECT count(*) FROM artwork
问题: 按字母顺序升序排列艺术品名称。

SQL: SELECT Name FROM artwork ORDER BY Name ASC
问题: 列出不属于“抽象”类型的作品名称。

SQL: SELECT Name FROM artwork WHERE TYPE != "抽象"
问题: 艺术节的名称和地点是什么？

SQL: SELECT Festival_Name ,  LOCATION FROM festival_detail
问题: 按照每年的升序排列的艺术节主席的名字是什么？

SQL: SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC
问题: 观众人数最多的艺术节地点是什么？

SQL: SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1
问题: 2007年度的艺术节名称是什么？

SQL: SELECT Festival_Name FROM festival_detail WHERE YEAR  =  2007
问题: 艺术节观众的平均人数是多少？

SQL: SELECT avg(Num_of_Audience) FROM festival_detail
问题: 展示最近三个艺术节的名称。

SQL: SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3
问题: 对于每个提名，显示作品的名称和提名它的艺术节名称。

SQL: SELECT T2.Name ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID
问题: 展示不同类型在2007的艺术节中被提名的艺术品。

SQL: SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T3.Year  =  2007
问题: 按提名年度的升序显示艺术品名称。

SQL: SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID ORDER BY T3.Year
问题: 显示提及“抽象”类型的艺术品的艺术节名称。

SQL: SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T2.Type  =  "抽象"
问题: 展示至少有两项艺术品提名的艺术节的名称和标识。

SQL: SELECT T1.Festival_ID ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*)  >=  2
问题: 显示每一个艺术节的ID、名字和它所提名的艺术品数量。

SQL: SELECT T1.Festival_ID ,  T3.Festival_Name ,  COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID
问题: 显示不同类型的艺术品及每种类型的艺术品对应的数量。

SQL: SELECT TYPE ,  COUNT(*) FROM artwork GROUP BY TYPE
问题: 列出最常见的艺术品类型。

SQL: SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
问题: 列出有一个以上艺术节的年份。

SQL: SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*)  >  1