jtjt520j/cspider_for_chinese_llama2_1.3b huggingface dataset:
Schema: CREATE TABLE Person (name VARCHAR, gender VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 找到“丽丽”的“女”朋友。

assistant: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '女'
Schema: CREATE TABLE Person (name VARCHAR, gender VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: “丽丽”的“女”朋友是什么？

assistant: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  '丽丽' AND T1.gender  =  '女'
Schema: CREATE TABLE Person (job VARCHAR, name VARCHAR, gender VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 找到“丽丽”的工作是“医生”的“男”朋友？

assistant: 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  =  '医生'
Schema: CREATE TABLE Person (job VARCHAR, name VARCHAR, gender VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 谁是“丽丽”的“医生”朋友？

assistant: 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  =  '医生'
Schema: CREATE TABLE Person (city VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 谁有一个来自“上海”的朋友？

assistant: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  '上海'
Schema: CREATE TABLE Person (city VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 来自“上海”的所有朋友的名字是什么？

assistant: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  '上海'
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR), CREATE TABLE person (age INTEGER)
user: 谁有比平均年龄小的朋友？

assistant: 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)
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR), CREATE TABLE person (age INTEGER)
user: 比所有朋友中平均年龄小的朋友的不同名字是什么？

assistant: 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)
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR), CREATE TABLE person (age INTEGER)
user: 谁有比平均年龄大的朋友？给出他们的朋友和他们的年龄

assistant: 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)
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR), CREATE TABLE person (age INTEGER)
user: 所有比平均年龄大的人的姓名、朋友和年龄是什么？

assistant: 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)
Schema: CREATE TABLE PersonFriend (YEAR INTEGER, name VARCHAR, friend VARCHAR)
user: 谁是“仲景”关系最长的朋友？

assistant: SELECT friend FROM PersonFriend WHERE name =  '仲景' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
Schema: CREATE TABLE PersonFriend (YEAR INTEGER, name VARCHAR, friend VARCHAR)
user: “仲景”与哪位朋友有最长久的友谊？

assistant: SELECT friend FROM PersonFriend WHERE name =  '仲景' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  '仲景')
Schema: CREATE TABLE Person (age VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, YEAR INTEGER)
user: “仲景”关系最长的朋友的年龄是什么？

assistant: 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 =  '仲景')
Schema: CREATE TABLE Person (age VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, YEAR INTEGER)
user: 与“仲景”相处时间最长的朋友的年龄是多少？

assistant: 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 =  '仲景')
Schema: CREATE TABLE PersonFriend (YEAR INTEGER, name VARCHAR, friend VARCHAR)
user: 找出与“丽丽”成为朋友时间最短的人的名字。

assistant: SELECT name FROM PersonFriend WHERE friend =  '丽丽' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
Schema: CREATE TABLE PersonFriend (YEAR INTEGER, name VARCHAR, friend VARCHAR)
user: 和“丽丽”交朋友时间最短的人叫什么名字？

assistant: SELECT name FROM PersonFriend WHERE friend =  '丽丽' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  '丽丽')
Schema: CREATE TABLE Person (job VARCHAR, age VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (YEAR INTEGER, friend VARCHAR)
user: 找出和“丽丽”交往最久的人的姓名、年龄和工作头衔。

assistant: 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 =  '丽丽')
Schema: CREATE TABLE Person (job VARCHAR, age VARCHAR, name VARCHAR), CREATE TABLE PersonFriend (YEAR INTEGER, friend VARCHAR)
user: 与“丽丽”交最长时间朋友的姓名、年龄和工作是什么？

assistant: 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 =  '丽丽')
Schema: CREATE TABLE person (name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR)
user: 没有朋友的人是谁？

assistant: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
Schema: CREATE TABLE person (name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR)
user: 没有朋友的人的名字是什么？

assistant: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 朋友的平均年龄最大的人是哪位？

assistant: 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
Schema: CREATE TABLE Person (age INTEGER, name VARCHAR), CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
user: 朋友平均年龄最大的人叫什么名字？平均年龄是多少？

assistant: 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
Schema: CREATE TABLE PersonFriend (city VARCHAR, name VARCHAR, friend VARCHAR), CREATE TABLE person (city VARCHAR, name VARCHAR, friend VARCHAR)
user: 没有朋友住在“郑州”市的总人数是多少？

assistant: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  '郑州')
Schema: CREATE TABLE PersonFriend (city VARCHAR, name VARCHAR, friend VARCHAR), CREATE TABLE person (city VARCHAR, name VARCHAR, friend VARCHAR)
user: 在“郑州”没有朋友的人的总数是多少？

assistant: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  '郑州')
Schema: CREATE TABLE PersonFriend (name VARCHAR), CREATE TABLE Person (name VARCHAR)
user: 找到“丽丽”的朋友。

assistant: 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 != '丽丽'
Schema: CREATE TABLE PersonFriend (name VARCHAR), CREATE TABLE Person (name VARCHAR)
user: “丽丽”的朋友们的名字是什么？

assistant: 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 != '丽丽'
Schema: CREATE TABLE member (Id VARCHAR)
user: 有多少名成员？

assistant: SELECT count(*) FROM member
Schema: CREATE TABLE member (Name VARCHAR)
user: 按字母升序顺序列出成员的名字。

assistant: SELECT Name FROM member ORDER BY Name ASC
Schema: CREATE TABLE member (Country VARCHAR, Name VARCHAR)
user: 成员的名字和国家是什么？

assistant: SELECT Name ,  Country FROM member
Schema: CREATE TABLE member (Country VARCHAR, Name VARCHAR)
user: 显示国家“美国”或“加拿大”的成员的名字。

assistant: SELECT Name FROM member WHERE Country  =  "美国" OR Country  =  "加拿大"
Schema: CREATE TABLE member (Country VARCHAR)
user: 显示不同的国家和每个国家成员的数量。

assistant: SELECT Country ,  COUNT(*) FROM member GROUP BY Country
Schema: CREATE TABLE member (Country VARCHAR)
user: 显示成员间最常见的国家。

assistant: SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
Schema: CREATE TABLE member (Country VARCHAR)
user: 哪些国家有两个以上成员？

assistant: SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2
Schema: CREATE TABLE college (College_Location VARCHAR, Leader_Name VARCHAR)
user: 显示大学的领导姓名和地点。

assistant: SELECT Leader_Name ,  College_Location FROM college
Schema: CREATE TABLE college (Name VARCHAR, College_ID VARCHAR), CREATE TABLE member (Name VARCHAR, College_ID VARCHAR)
user: 显示会员的姓名和他们入学大学名称。

assistant: SELECT T2.Name ,  T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID
Schema: CREATE TABLE college (College_Location VARCHAR, College_ID VARCHAR), CREATE TABLE member (Name VARCHAR, College_ID VARCHAR)
user: 按照会员名字升序的字母顺序，显示会员姓名和他们所去大学的位置。

assistant: 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
Schema: CREATE TABLE college (College_ID VARCHAR, Leader_Name VARCHAR), CREATE TABLE member (Country VARCHAR, College_ID VARCHAR)
user: 显示与来自国家“加拿大”的成员相关的大学的不同领导者的名字。

assistant: SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "加拿大"
Schema: CREATE TABLE member (Member_ID VARCHAR, Name VARCHAR), CREATE TABLE round (Member_ID VARCHAR, Decoration_Theme VARCHAR)
user: 显示成员的姓名和装饰主题。

assistant: SELECT T1.Name ,  T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID
Schema: CREATE TABLE member (Member_ID VARCHAR, Name VARCHAR), CREATE TABLE round (Rank_in_Round INTEGER, Member_ID VARCHAR)
user: 显示在轮次中具有高于等级3的成员的姓名。

assistant: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  >  3
Schema: CREATE TABLE member (Member_ID VARCHAR, Name VARCHAR), CREATE TABLE round (Member_ID VARCHAR)
user: 在轮次中以升序排列成员的姓名。

assistant: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC
Schema: CREATE TABLE member (Member_ID VARCHAR, Name VARCHAR), CREATE TABLE round (Member_ID VARCHAR, Name VARCHAR)
user: 列出没有参加任何回合的成员的姓名。

assistant: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)
Schema: CREATE TABLE documents (document_name VARCHAR, access_count VARCHAR)
user: 按照文档名称的字母顺序查找所有文档的名称和访问次数。

assistant: SELECT document_name ,  access_count FROM documents ORDER BY document_name
Schema: CREATE TABLE documents (document_name VARCHAR, access_count VARCHAR)
user: 按照文档名称的字母顺序排序的所有文档的名称和访问次数是什么？

assistant: SELECT document_name ,  access_count FROM documents ORDER BY document_name
Schema: CREATE TABLE documents (document_name VARCHAR, access_count VARCHAR)
user: 找出被访问次数最多的文档的名称以及其被访问的次数是多少？

assistant: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
Schema: CREATE TABLE documents (document_name VARCHAR, access_count VARCHAR)
user: 被访问次数最多的文档的名称以及被访问次数是多少？

assistant: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
Schema: CREATE TABLE documents (document_type_code VARCHAR)
user: 查找具有超过4个文档的文档类型。

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
Schema: CREATE TABLE documents (document_type_code VARCHAR)
user: 超过4个文档的文档类型的编码是什么？

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
Schema: CREATE TABLE documents (document_type_code VARCHAR, access_count INTEGER)
user: 找出最流行的文档类型中所有文档的总访问计数。

assistant: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE documents (document_type_code VARCHAR, access_count INTEGER)
user: 最常见文档类型的文档的总访问次数是多少？

assistant: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE documents (access_count INTEGER)
user: 文件的平均访问次数是多少？

assistant: SELECT avg(access_count) FROM documents
Schema: CREATE TABLE documents (access_count INTEGER)
user: 查找所有文件的平均访问次数。

assistant: SELECT avg(access_count) FROM documents
Schema: CREATE TABLE documents (document_structure_code VARCHAR), CREATE TABLE document_structures (document_structure_code VARCHAR, document_structure_description VARCHAR)
user: 访问次数最少的文档的结构是什么？

assistant: 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
Schema: CREATE TABLE documents (document_structure_code VARCHAR), CREATE TABLE document_structures (document_structure_code VARCHAR, document_structure_description VARCHAR)
user: 返回被访问次数最少的文档的结构描述。

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR, document_type_code VARCHAR)
user: 名为“张伟的简历”的文档的文件类型是什么？

assistant: SELECT document_type_code FROM documents WHERE document_name  =  "张伟的简历"
Schema: CREATE TABLE documents (document_name VARCHAR, document_type_code VARCHAR)
user: 返回名为“张伟的简历”的文档的类型代码。

assistant: SELECT document_type_code FROM documents WHERE document_name  =  "张伟的简历"
Schema: CREATE TABLE documents (document_name VARCHAR, document_type_code VARCHAR, document_structure_code VARCHAR)
user: 查找既属于最流行的三种类型之一又具有最流行的三种结构之一的文档列表。

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR, document_type_code VARCHAR, document_structure_code VARCHAR)
user: 具有三种最常见类型之一和三种最常见结构之一的文档的名称是什么？

assistant: 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
Schema: CREATE TABLE documents (document_type_code VARCHAR, access_count INTEGER)
user: 什么文档类型拥有超过10000的总访问量。

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
Schema: CREATE TABLE documents (document_type_code VARCHAR, access_count INTEGER)
user: 返回总访问计数不超过10000的文档类型的代码。

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (section_title VARCHAR, document_code VARCHAR)
user: 名为“张伟的简历”的文件的所有章节标题是什么？

assistant: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "张伟的简历"
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (section_title VARCHAR, document_code VARCHAR)
user: 给出名字是“张伟的简历”的文档的章节标题。

assistant: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "张伟的简历"
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (document_name VARCHAR, document_code VARCHAR)
user: 查找所有文件中无任何章节的文件的名称。

assistant: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (document_name VARCHAR, document_code VARCHAR)
user: 没有任何章节的文件的名称是什么？

assistant: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
Schema: CREATE TABLE users (role_code VARCHAR, user_name VARCHAR, password VARCHAR)
user: 列出最受欢迎角色的用户所有的用户名和密码。

assistant: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE users (role_code VARCHAR, user_name VARCHAR, password VARCHAR)
user: 用户最常用的角色的用户名和密码是什么？

assistant: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Schema: CREATE TABLE documents (document_code VARCHAR, access_count INTEGER), CREATE TABLE document_functional_areas (functional_area_code VARCHAR, document_code VARCHAR), CREATE TABLE functional_areas (functional_area_description VARCHAR, functional_area_code VARCHAR)
user: 查找具有功能区域“致谢”的文档的平均访问次数。

assistant: 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  =  "致谢"
Schema: CREATE TABLE documents (document_code VARCHAR, access_count INTEGER), CREATE TABLE document_functional_areas (functional_area_code VARCHAR, document_code VARCHAR), CREATE TABLE functional_areas (functional_area_description VARCHAR, functional_area_code VARCHAR)
user: 功能区域描述为“致谢”的文档的平均访问次数是多少？

assistant: 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  =  "致谢"
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (section_id VARCHAR, document_code VARCHAR), CREATE TABLE document_sections_images (section_id VARCHAR)
user: 查找没有任何图像的文档的名称。

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (section_id VARCHAR, document_code VARCHAR), CREATE TABLE document_sections_images (section_id VARCHAR)
user: 没有任何图像的文档的名称是什么？

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (document_code VARCHAR)
user: 拥有最多章节数的文档的名字是什么？

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR, document_code VARCHAR), CREATE TABLE document_sections (document_code VARCHAR)
user: 返回拥有最多章节数的文档的名字。

assistant: 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
Schema: CREATE TABLE documents (document_name VARCHAR)
user: 列出包含“CV”的所有文档的名称。

assistant: SELECT document_name FROM documents WHERE document_name LIKE "简历"
Schema: CREATE TABLE documents (document_name VARCHAR)
user: 包含子字符串“CV”的文档的名称是什么？

assistant: SELECT document_name FROM documents WHERE document_name LIKE "简历"
Schema: CREATE TABLE users (user_login VARCHAR)
user: 有多少用户曾登录过？

assistant: SELECT count(*) FROM users WHERE user_login  =  1
Schema: CREATE TABLE users (user_login VARCHAR)
user: 计算登录的用户数。

assistant: SELECT count(*) FROM users WHERE user_login  =  1
Schema: CREATE TABLE ROLES (role_code VARCHAR, user_login VARCHAR, role_description VARCHAR), CREATE TABLE users (role_code VARCHAR, user_login VARCHAR, role_description VARCHAR)
user: 查找已登录的用户中最流行的角色的描述。

assistant: 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)
Schema: CREATE TABLE ROLES (role_code VARCHAR, user_login VARCHAR, role_description VARCHAR), CREATE TABLE users (role_code VARCHAR, user_login VARCHAR, role_description VARCHAR)
user: 在已经登录的用户中，最流行的角色描述是什么？

assistant: 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)
Schema: CREATE TABLE documents (document_structure_code VARCHAR, access_count INTEGER)
user: 查找具有最不流行结构的文档的平均访问计数。

assistant: SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1
Schema: CREATE TABLE documents (document_structure_code VARCHAR, access_count INTEGER)
user: 具有最不常用结构的文档的平均访问计数是多少？

assistant: SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1
Schema: CREATE TABLE images (image_url VARCHAR, image_name VARCHAR)
user: 按名称的顺序列出所有的图像名称和URL。

assistant: SELECT image_name ,  image_url FROM images ORDER BY image_name
Schema: CREATE TABLE images (image_url VARCHAR, image_name VARCHAR)
user: 按字母顺序排列的图像名称和URL是什么？

assistant: SELECT image_name ,  image_url FROM images ORDER BY image_name
Schema: CREATE TABLE users (role_code VARCHAR)
user: 查找每个角色中的用户数。

assistant: SELECT count(*) ,  role_code FROM users GROUP BY role_code
Schema: CREATE TABLE users (role_code VARCHAR)
user: 用户的角色代码有哪些，每个用户有多少个？

assistant: SELECT count(*) ,  role_code FROM users GROUP BY role_code
Schema: CREATE TABLE documents (document_type_code VARCHAR)
user: 哪些文档类型有超过2个对应的文档？

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  2
Schema: CREATE TABLE documents (document_type_code VARCHAR)
user: 给出具有超过2个对应文档的文档类型的代码。

assistant: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  2
Schema: CREATE TABLE Companies (Id VARCHAR)
user: 有多少家公司？

assistant: SELECT count(*) FROM Companies
Schema: CREATE TABLE Companies (Id VARCHAR)
user: 统计公司的数量。

assistant: SELECT count(*) FROM Companies
Schema: CREATE TABLE Companies (name VARCHAR, Market_Value_billion VARCHAR)
user: 以市场价值递减的顺序列出公司名称。

assistant: SELECT name FROM Companies ORDER BY Market_Value_billion DESC
Schema: CREATE TABLE Companies (name VARCHAR, Market_Value_billion VARCHAR)
user: 按公司市场价值的降序对公司名称进行排序。

assistant: SELECT name FROM Companies ORDER BY Market_Value_billion DESC
Schema: CREATE TABLE Companies (Headquarters VARCHAR, name VARCHAR)
user: 总部不是“中国”的公司名称是什么？

assistant: SELECT name FROM Companies WHERE Headquarters != '中国'
Schema: CREATE TABLE Companies (Headquarters VARCHAR, name VARCHAR)
user: 找出总部不在“中国”的公司名称。

assistant: SELECT name FROM Companies WHERE Headquarters != '中国'
Schema: CREATE TABLE Companies (Assets_billion VARCHAR, name VARCHAR)
user: 按公司名称升序排列的每个公司的名称和资产是什么？

assistant: SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC
Schema: CREATE TABLE Companies (Assets_billion VARCHAR, name VARCHAR)
user: 按公司名称的升序排列各公司的名称和资产。

assistant: SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC
Schema: CREATE TABLE Companies (Profits_billion INTEGER)
user: 公司的平均利润是多少？

assistant: SELECT avg(Profits_billion) FROM Companies
Schema: CREATE TABLE Companies (Profits_billion INTEGER)
user: 计算公司的平均利润。

assistant: SELECT avg(Profits_billion) FROM Companies
Schema: CREATE TABLE Companies (Sales_billion INTEGER, Industry VARCHAR)
user: 那些行业不是“银行业”的公司的最高销售额和最低销售额是多少？

assistant: SELECT max(Sales_billion) ,  min(Sales_billion) FROM Companies WHERE Industry != "银行业"
Schema: CREATE TABLE Companies (Sales_billion INTEGER, Industry VARCHAR)
user: 找出不在“银行业”行业的公司的最大和最小销售额。

assistant: SELECT max(Sales_billion) ,  min(Sales_billion) FROM Companies WHERE Industry != "银行业"
Schema: CREATE TABLE Companies (Industry VARCHAR)
user: 公司有多少不同的行业？

assistant: SELECT count(DISTINCT Industry) FROM Companies
Schema: CREATE TABLE Companies (Industry VARCHAR)
user: 统计公司的不同行业数量。

assistant: SELECT count(DISTINCT Industry) FROM Companies