jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: “赛车”有多少会员年龄超过18岁？

SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车" AND t3.age  >  18
问题: 统计年龄在18岁以上的“赛车”俱乐部会员人数。

SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车" AND t3.age  >  18
问题: “赛车”俱乐部有多少成员年龄小于18岁？

SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车" AND t3.age  <  18
问题: 统计年龄在18岁以下的“赛车”俱乐部会员人数。

SQL: SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车" AND t3.age  <  18
问题: 找出所有俱乐部中至少有一个成员来自城市代码是“武汉”的城市的俱乐部名字。

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "武汉"
问题: 哪些俱乐部有一个或多个会员来自城市的代码是“武汉”的城市？返回俱乐部的名字。

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "武汉"
问题: 查找至少有一个成员来自城市的代码是“重庆”的城市的俱乐部的名称，。

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "重庆"
问题: 至少有一个成员来自城市的代码是“重庆”的城市的俱乐部的名称是什么？

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "重庆"
问题: 名字是“代” “兵”的学生参加了多少个俱乐部？

SQL: SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "代" AND t3.lname  =  "兵"
问题: 计算名为“代” “兵”的学生参加俱乐部的会员数量。

SQL: SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "代" AND t3.lname  =  "兵"
问题: 列出名字是“秦” “小明”的学生参加的俱乐部。

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "秦" AND t3.lname  =  "小明"
问题: 有会员名“秦” “小明”的俱乐部的名字是什么？

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "秦" AND t3.lname  =  "小明"
问题: 列出至少有一个成员且顾问是“1121”的俱乐部。

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.advisor  =  1121
问题: 至少有一个成员且顾问是“1121”的俱乐部是那些？

SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.advisor  =  1121
问题: “赛车”俱乐部成员的平均年龄是多少？

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车"
问题: 找出“赛车”俱乐部成员的平均年龄。

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "赛车"
问题: 找到俱乐部“北大创业俱乐部”成员的平均年龄。

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "北大创业俱乐部"
问题: 俱乐部“北大创业俱乐部”成员的平均年龄有多大？

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "北大创业俱乐部"
问题: 返回俱乐部“网球俱乐部”会员的平均年龄。

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "网球俱乐部"
问题: 计算俱乐部“网球俱乐部”成员的平均年龄。

SQL: SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "网球俱乐部"
问题: 在“1986-08-26 20:49:27”之前送交文件的补助金额和在“1989-03-16 18:27:16”之后结束补助的补助金额分别是多少？

SQL: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id WHERE T2.sent_date  <  '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date  >  '1989-03-16 18:27:16'
问题: 在“1986-08-26 20:49:27”之前寄出的文件的补助金额和在“1989-03-16 18:27:16”补助结束之后的补助金额是多少？

SQL: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id WHERE T2.sent_date  <  '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date  >  '1989-03-16 18:27:16'
问题: 列出既有“专利”产出又有“论文”产出的项目细节。

SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  '论文' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  '专利'
问题: 既有“专利”产出又有“论文”产出的项目细节是什么？

SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  '论文' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  '专利'
问题: 被描述为“研究”的组织的总补助金额是多少？

SQL: SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id  =  T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type  =  T3.organisation_type WHERE T3.organisation_type_description  =  '研究'
问题: “研究”经费的总额是多少？

SQL: SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id  =  T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type  =  T3.organisation_type WHERE T3.organisation_type_description  =  '研究'
问题: 列出招聘“领导”员工最多的项目的开始和结束时间。

SQL: SELECT date_from ,  date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  '领导'
问题: 员工在具有最多员工并且具有“领导”角色的项目中工作的开始和结束时间是什么？

SQL: SELECT date_from ,  date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  '领导'
问题: 找出参与的组织的组织ID和详细信息

SQL: SELECT T2.organisation_id ,  T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id  =  T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount)  >  6000
问题: 有超过6000美元的资助的所有组织的id和细节是什么？

SQL: SELECT T2.organisation_id ,  T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id  =  T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount)  >  6000
问题: 研究人员最多的组织的组织类型和id是什么？

SQL: SELECT T1.organisation_type ,  T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 拥有最多研究人员的组织的类型和ID是什么？

SQL: SELECT T1.organisation_type ,  T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 哪个类型的组织雇佣了大多数研究人员？

SQL: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1
问题: 研究人员最多的组织类型是什么？

SQL: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1
问题: 查找按组织类型为“研究”的被授予的授权金额超过5000的文件的发送日期

SQL: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  '研究'
问题: 所有资助金额超过5000并参与“研究”的文件的发送日期是什么？

SQL: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  '研究'
问题: 对于描述为“常规”类型或授予超过100份的文件，收到的回复日期是什么？

SQL: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  '常规' OR T3.grant_amount  >  100
问题: 被授予超过100美元的文件且描述类型为“常规”的文件回复日期是什么？

SQL: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  '常规' OR T3.grant_amount  >  100
问题: 列出没有雇用任何担任“研究院”角色作为工作人员的项目的细节。

SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  '研究院' )
问题: 没有雇用任何担任“研究院”角色作为工作人员的项目的细节有哪些？

SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  '研究院' )
问题: 对于详细描述为“详细”或具有两个以上产出的项目的任务细节、任务标识和项目标识是什么？

SQL: SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  '详细' UNION SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.project_id HAVING count(*)  >  2
问题: 对于被详细描述为“详细”或者至少有3个结果的项目的任务细节、任务id和项目id是什么？

SQL: SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  '详细' UNION SELECT T1.task_details ,  T1.task_id ,  T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.project_id HAVING count(*)  >  2
问题: 角色是“研究院”的工作人员什么时候开始工作，什么时候停止工作？

SQL: SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  '研究院'
问题: “研究院”是什么时候开始工作的？

SQL: SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  '研究院'
问题: 员工有多少种角色？

SQL: SELECT count(DISTINCT role_code) FROM Project_Staff
问题: 项目员工有多少不同的角色？

SQL: SELECT count(DISTINCT role_code) FROM Project_Staff
问题: 每个组织的补助金总额是多少？列出组织ID。

SQL: SELECT sum(grant_amount) ,  organisation_id FROM Grants GROUP BY organisation_id
问题: 每个组织被给予的赠款总额是多少，其id是什么？

SQL: SELECT sum(grant_amount) ,  organisation_id FROM Grants GROUP BY organisation_id
问题: 列出用子字符串“已发表”描述研究成果的项目的项目细节。

SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code  =  T3.outcome_code WHERE T3.outcome_description LIKE '已发表'
问题: 已发表的项目有哪些细节？

SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code  =  T3.outcome_code WHERE T3.outcome_description LIKE '已发表'
问题: 每个项目有多少员工？按升序排列项目ID和编号。

SQL: SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC
问题: 对于每个项目ID，它有多少员工？按升序排列它们。

SQL: SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC
问题: 什么是对“研究院”角色的完整描述。

SQL: SELECT role_description FROM Staff_Roles WHERE role_code  =  '研究院'
问题: 什么是对“研究院”工作的完整描述？

SQL: SELECT role_description FROM Staff_Roles WHERE role_code  =  '研究院'
问题: 项目的第一批员工是什么时候开始工作的？

SQL: SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1
问题: 第一个工作人员什么时候开始工作的？

SQL: SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1
问题: 哪个项目取得最多的成果？列出项目细节和项目ID。

SQL: SELECT T1.project_details ,  T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1
问题: 取得最多的成果的项目细节和ID是什么？

SQL: SELECT T1.project_details ,  T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1
问题: 哪些项目没有结果？列出其项目细节。

SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )
问题: 没有结果的项目细节是什么？

SQL: SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )
问题: 哪个组织雇佣了最多的研究人员？列出组织ID、类型和细节。

SQL: SELECT T1.organisation_id ,  T1.organisation_type ,  T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 具有最多研究人员的组织的ID、类型和细节是什么？

SQL: SELECT T1.organisation_id ,  T1.organisation_type ,  T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 显示参与去的最多项目结果的项目人员的角色描述和项目人员的ID。

SQL: SELECT T1.role_description ,  T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1
问题: 对于每个员工ID，对涉及最多项目的角色的描述是什么？

SQL: SELECT T1.role_description ,  T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1
问题: 前缀是“初始”的描述文档是哪种文档类型？

SQL: SELECT document_type_code FROM Document_Types WHERE document_description LIKE '初始'
问题: 从“初始”一词开始描述的文档的类型是什么？

SQL: SELECT document_type_code FROM Document_Types WHERE document_description LIKE '初始'
问题: 列出具有文件描述为“常规”和“初始申请”的补助金的开始日期。

SQL: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  '常规' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  '初始申请'
问题: 具有文件描述为“常规”和“初始申请”的补助金的开始日期是什么？

SQL: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  '常规' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  '初始申请'
问题: 一个补助最多能得到多少文件？列出补助金ID和号码。

SQL: SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1
问题: 每个补助金ID有多少文档，哪一个文档最多？

SQL: SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1
问题: 查找组织细节为“运动”的组织类型描述。

SQL: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  '运动'
问题: 组织细节为“运动”的组织类型描述是什么？

SQL: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  '运动'
问题: 被称为“赞助商”的组织的所有细节是什么？按升序排序结果。

SQL: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  '赞助商' ORDER BY organisation_details
问题: 按升序对结果进行排序的所有被描述为“赞助商”组织的细节是什么？

SQL: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  '赞助商' ORDER BY organisation_details
问题: 从所有项目中产生了多少“专利”成果？

SQL: SELECT count(*) FROM Project_outcomes WHERE outcome_code  =  '专利'
问题: 在所有项目中多少“专利”成果产出？

SQL: SELECT count(*) FROM Project_outcomes WHERE outcome_code  =  '专利'
问题: 在“1989-04-24 23:51:54”之前，有多少项目人员担任领导或开始工作？

SQL: SELECT count(*) FROM Project_Staff WHERE role_code  =  '领导' OR date_from  <  '1989-04-24 23:51:54'
问题: 在“1989-04-24 23:51:54”之前，有多少项目成员是领导者或开始工作？

SQL: SELECT count(*) FROM Project_Staff WHERE role_code  =  '领导' OR date_from  <  '1989-04-24 23:51:54'
问题: 员工离开项目的最后日期是什么？

SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
问题: 员工离开项目的截止日期是什么时候？

SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
问题: 细节是“机密”的项目的成果描述是什么？

SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  '机密'
问题: 项目细节是“机密”的项目对应的成果描述是什么？

SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  '机密'
问题: 列出具有最高成果计数的组织ID和及其成果计数。

SQL: SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 具有最多成果的组织的id是什么，以及有多少成果？

SQL: SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
问题: 列出由组织发起的项目的项目细节

SQL: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )
问题: 项目最多的组织发起的项目的细节是什么？

SQL: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )
问题: 列出研究人员的细节，并按升序排列。

SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC
问题: 研究人员有哪些细节？按字母顺序顺序排列结果。

SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC
问题: 总计有多少个任务？

SQL: SELECT count(*) FROM Tasks
问题: 有多少个任务？

SQL: SELECT count(*) FROM Tasks
问题: 每个项目有多少任务？列出任务计数和项目细节。

SQL: SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id
问题: 每个项目ID有多少任务？

SQL: SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id
问题: 员工在“2003-04-19 15:06:20”和“2016-03-15 00:33:18”之内的角色是什么？

SQL: SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'
问题: 在“2003-04-19 15:06:20”和“2016-03-15 00:33:18”之间，员工扮演什么角色？

SQL: SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'
问题: 所有项目成果的描述是什么？

SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code
问题: 列出所有项目的成果描述。

SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code
问题: 员工最常见的角色是什么？

SQL: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
问题: 员工最常见的角色是那个？

SQL: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
问题: “丹丹”有几个朋友？

SQL: SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  '丹丹'
问题: “丹丹”的朋友有多少个？

SQL: SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  '丹丹'
问题: 这个网络有多少“女”？

SQL: SELECT count(*) FROM Person WHERE gender  =  '女'
问题: 网络中性别是“女”的人数有多少？

SQL: SELECT count(*) FROM Person WHERE gender  =  '女'
问题: 所有人的平均年龄是多少？

SQL: SELECT avg(age) FROM Person
问题: 表格中所有人的平均年龄是多少？

SQL: SELECT avg(age) FROM Person
问题: 他们来自多少个不同的城市？

SQL: SELECT count(DISTINCT city) FROM Person
问题: 人们的故乡来自于多少个不同的城市？

SQL: SELECT count(DISTINCT city) FROM Person
问题: 他们有多少种工作？

SQL: SELECT count(DISTINCT job) FROM Person
问题: 列出了多少份不同的工作？

SQL: SELECT count(DISTINCT job) FROM Person
问题: 谁是最老的人？

SQL: SELECT name FROM Person WHERE age  =  (SELECT max(age) FROM person)
问题: 最老的人叫什么名字？

SQL: SELECT name FROM Person WHERE age  =  (SELECT max(age) FROM person)
问题: 谁是年龄最大的“学生”？

SQL: SELECT name FROM Person WHERE job  =  '学生' AND age  =  (SELECT max(age) FROM person WHERE job  =  '学生' )
问题: 年龄最大的“学生”叫什么名字？

SQL: SELECT name FROM Person WHERE job  =  '学生' AND age  =  (SELECT max(age) FROM person WHERE job  =  '学生' )
问题: 谁是最年轻的“男”？

SQL: SELECT name FROM Person WHERE gender  =  '男' AND age  =  (SELECT min(age) FROM person WHERE gender  =  '男' )
问题: 最年轻的“男”叫什么名字？

SQL: SELECT name FROM Person WHERE gender  =  '男' AND age  =  (SELECT min(age) FROM person WHERE gender  =  '男' )
问题: 名字叫“仲景”的“医生”年纪多大了？

SQL: SELECT age FROM Person WHERE job  =  '医生' AND name  =  '仲景'
问题: 那个叫“仲景”的“医生”的年龄是多少岁？

SQL: SELECT age FROM Person WHERE job  =  '医生' AND name  =  '仲景'
问题: 年龄低于30岁的人是谁？

SQL: SELECT name FROM Person WHERE age  <  30
问题: 年龄在30岁以下的人叫什么名字？

SQL: SELECT name FROM Person WHERE age  <  30
问题: 有多少人年龄大于30且工作是“摄影师”？

SQL: SELECT count(*) FROM Person WHERE age  >  30 AND job  =  '摄影师'
问题: 有多少“摄影师”的年龄超过30岁？

SQL: SELECT count(*) FROM Person WHERE age  >  30 AND job  =  '摄影师'
问题: 每个性别的平均年龄是多少？

SQL: SELECT avg(age) ,  gender FROM Person GROUP BY gender
问题: 每个性别的平均年龄有多大？

SQL: SELECT avg(age) ,  gender FROM Person GROUP BY gender
问题: 不同工作职称的平均年龄是多少？

SQL: SELECT avg(age) ,  job FROM Person GROUP BY job
问题: 每个工作的平均年龄是多少？

SQL: SELECT avg(age) ,  job FROM Person GROUP BY job
问题: 不同职称的“男”的平均年龄是多少？

SQL: SELECT avg(age) ,  job FROM Person WHERE gender  =  '男' GROUP BY job
问题: 每个工作的“男”平均年龄是多少？

SQL: SELECT avg(age) ,  job FROM Person WHERE gender  =  '男' GROUP BY job
问题: 不同职称的最低年龄是多少？

SQL: SELECT min(age) ,  job FROM Person GROUP BY job
问题: 每个工作年龄最小的人的年纪有多大？

SQL: SELECT min(age) ,  job FROM Person GROUP BY job
问题: 找到每个性别中年龄低于40岁的人的数量。

SQL: SELECT count(*) ,  gender FROM Person WHERE age  <  40 GROUP BY gender
问题: 每个性别有多少人不足40岁？

SQL: SELECT count(*) ,  gender FROM Person WHERE age  <  40 GROUP BY gender
问题: 按年龄排序找出年龄比任何“摄影师”年龄都大的人的名字。

SQL: SELECT name FROM Person WHERE age  >  (SELECT min(age) FROM person WHERE job  =  '摄影师') ORDER BY age
问题: 所有比至少一个“摄影师”年龄大的人的名字是什么？按年龄顺序排序。

SQL: SELECT name FROM Person WHERE age  >  (SELECT min(age) FROM person WHERE job  =  '摄影师') ORDER BY age
问题: 找出年龄大于所有“摄影师”年龄的人数。

SQL: SELECT count(*) FROM Person WHERE age  >  (SELECT max(age) FROM person WHERE job  =  '摄影师')
问题: 有多少人比每个“摄影师”年纪都大？

SQL: SELECT count(*) FROM Person WHERE age  >  (SELECT max(age) FROM person WHERE job  =  '摄影师')
问题: 按年龄的顺序列出所有的人的姓名和职称。

SQL: SELECT name ,  job FROM Person ORDER BY name
问题: 按姓名的字母顺序排列的每个人的姓名和职称是什么？

SQL: SELECT name ,  job FROM Person ORDER BY name
问题: 按年龄顺序降序排列所有人的姓名。

SQL: SELECT name FROM Person ORDER BY age DESC
问题: 按年龄顺序排序的每个人的名字是什么？

SQL: SELECT name FROM Person ORDER BY age DESC
问题: 根据年龄顺序找出所有“男”的姓名和年龄。

SQL: SELECT name FROM Person WHERE gender  =  '男' ORDER BY age
问题: 按年龄顺序排列的每个“男”的名字和年龄的结果是多少？

SQL: SELECT name FROM Person WHERE gender  =  '男' ORDER BY age
问题: 找出“丹丹”和“丽丽”共同的朋友的姓名和年龄。

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

SQL: SELECT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '丹丹' INTERSECT SELECT T1.name ,   T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  '丽丽'