jtjt520j/CSpider_for_Qwen huggingface dataset:
问题: 党员人数最多的政党名称是什么？

SQL: SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1
问题: 返回最多的成员党的名称。

SQL: SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1
问题: 显示所有的政党名称及其地区名称。

SQL: SELECT T1.party_name ,  T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id
问题: 所有政党及其对应的地区的名称是什么？

SQL: SELECT T1.party_name ,  T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id
问题: 显示没有任何成员的政党的名称。

SQL: SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)
问题: 没有成员的政党名称是什么？

SQL: SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)
问题: 显示同时在id为3的政党和id为1的政党的成员名称。

SQL: SELECT member_name FROM member WHERE party_id  =  3 INTERSECT SELECT member_name FROM member WHERE party_id  =  1
问题: 同时在id为3的政党和在id为1的政党的成员名字是什么？

SQL: SELECT member_name FROM member WHERE party_id  =  3 INTERSECT SELECT member_name FROM member WHERE party_id  =  1
问题: 显示不在进步党中的成员的名字。

SQL: SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id WHERE T2.Party_name != "进步党"
问题: 不在进步党中的成员的名字是什么？

SQL: SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id WHERE T2.Party_name != "进步党"
问题: 我们有多少党派的事件？

SQL: SELECT count(*) FROM party_events
问题: 统计党派事件的数量。

SQL: SELECT count(*) FROM party_events
问题: 显示每个党派的名称和事件的数量。

SQL: SELECT T2.party_name ,  count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id
问题: 每个党派有多少事件？

SQL: SELECT T2.party_name ,  count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id
问题: 显示所有不负责任何项目的成员名称。

SQL: SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id
问题: 不负责任何项目的成员的姓名是什么？

SQL: SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id
问题: 至少有2个项目的政党名称是什么？

SQL: SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id HAVING count(*)  >=  2
问题: 返回具有两个或多个项目的政党的名称。

SQL: SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id HAVING count(*)  >=  2
问题: 负责最多项目的成员叫什么名字？

SQL: SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1
问题: 返回负责最多项目的成员的姓名。

SQL: SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1
问题: 查找具有超过2条记录的事件名称。

SQL: SELECT event_name FROM party_events GROUP BY event_name HAVING count(*)  >  2
问题: 具有超过2条记录的事件名称是什么？

SQL: SELECT event_name FROM party_events GROUP BY event_name HAVING count(*)  >  2
问题: 英国地区发生了多少年会？

SQL: SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id  =  t2.region_id JOIN party_events AS t3 ON t2.party_id  =  t3.party_id WHERE t1.region_name  =  "英国" AND t3.Event_Name  =  "年会"
问题: 计算在英国地区举行的年度会议的次数。

SQL: SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id  =  t2.region_id JOIN party_events AS t3 ON t2.party_id  =  t3.party_id WHERE t1.region_name  =  "英国" AND t3.Event_Name  =  "年会"
问题: 有多少飞行员？

SQL: SELECT count(*) FROM pilot
问题: 按等级升序排列飞行员的姓名。

SQL: SELECT Pilot_name FROM pilot ORDER BY Rank ASC
问题: 飞行员的职位和队伍是什么？

SQL: SELECT POSITION ,  Team FROM pilot
问题: 列出30岁以上飞行员的不同位置。

SQL: SELECT DISTINCT POSITION FROM pilot WHERE Age  >  30
问题: 显示“小强”或“小利”队飞行员的名字。

SQL: SELECT Pilot_name FROM pilot WHERE Team  =  "小强" OR Team  =  "小利"
问题: 最高级别飞行员的加入的年份是什么？

SQL: SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1
问题: 不同国籍的飞行员是什么？显示不同国籍和每个国籍的飞行员人数。

SQL: SELECT Nationality ,  COUNT(*) FROM pilot GROUP BY Nationality
问题: 显示飞行员最常见的国籍。

SQL: SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
问题: 显示有在2005年以后加入和在2000年之前加入的飞行员位置。

SQL: SELECT POSITION FROM pilot WHERE Join_Year	 <  2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year	 >  2005
问题: 显示飞行员的名字和他们飞行的飞行器型号。

SQL: SELECT T3.Pilot_name ,  T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID  =  T3.Pilot_ID
问题: 按照飞行员级别的升序显示飞行员的姓名和他们驾驶的飞机的系列号。

SQL: SELECT T3.Pilot_name ,  T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID  =  T3.Pilot_ID ORDER BY T3.Rank
问题: 显示由34岁以下飞行员驾驶的飞机系列号

SQL: SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID  =  T3.Pilot_ID WHERE T3.Age  <  34
问题: 显示飞行员的名字和他们的记录数量。

SQL: SELECT T2.Pilot_name ,  COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID  =  T2.pilot_ID GROUP BY T2.Pilot_name
问题: 显示有一个以上记录的飞行员的姓名。

SQL: SELECT T2.Pilot_name ,  COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID  =  T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*)  >  1
问题: 列出没有任何记录的飞行员的名字。

SQL: SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record)
问题: 我们有什么文档状态代码？

SQL: SELECT document_status_code FROM Ref_Document_Status;
问题: 文档状态代码“工作”的描述是什么？

SQL: SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = "工作";
问题: 我们有什么文档类型代码？

SQL: SELECT document_type_code FROM Ref_Document_Types;
问题: 文档类型“论文”的描述是什么？

SQL: SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "论文";
问题: 运输代理名称是什么？

SQL: SELECT shipping_agent_name FROM Ref_Shipping_Agents;
问题: “中国邮政”船舶代理的运输代理代码是什么？

SQL: SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = "中国邮政";
问题: 什么是所有角色代码？

SQL: SELECT role_code FROM ROLES;
问题: 角色代码为“ED”的描述是什么？

SQL: SELECT role_description FROM ROLES WHERE role_code = "ED";
问题: 我们有多少员工？

SQL: SELECT count(*) FROM Employees;
问题: 雇员“可可”的角色是什么？

SQL: SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "可可";
问题: 列出文件的所有ID和收据日期。

SQL: SELECT document_id ,  receipt_date FROM Documents;
问题: 每个角色有多少员工？列出员工的角色描述、ID和数量。

SQL: SELECT T1.role_description ,  T2.role_code ,  count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;
问题: 列出具有不止一个雇员的角色，并列出角色描述和员工的人数。

SQL: SELECT Roles.role_description , count(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING count(Employees.employee_id)  >  1;
问题: ID为1的文档的文档状态描述是什么？

SQL: SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;
问题: 有多少文档的状态代码是完成状态？

SQL: SELECT count(*) FROM Documents WHERE document_status_code = "完结";
问题: 列出ID是2的文档的文档类型代码。

SQL: SELECT document_type_code FROM Documents WHERE document_id = 2;
问题: 列出具有完成状态代码和类型代码为论文的所有文档的文档ID。

SQL: SELECT document_id FROM Documents WHERE document_status_code = "完结" AND document_type_code = "论文";
问题: ID为2的文件的运输代理的名称是什么？

SQL: SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;
问题: “中国邮政”公司运送了多少份文件？

SQL: SELECT count(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "中国邮政";
问题: 哪一个运输代理运送了最多的文件？列出运输代理名称和文件数量。

SQL: SELECT Ref_Shipping_Agents.shipping_agent_name , count(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY count(Documents.document_id) DESC LIMIT 1;
问题: 文件ID为3的收据日期是什么？

SQL: SELECT receipt_date FROM Documents WHERE document_id = 3;
问题: ID为4的文件的邮寄地址是什么？

SQL: SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;
问题: ID 7的文件的邮寄日期是什么？

SQL: SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;
问题: 列出具有完成状态和“论文”类型且不是由名为“中国邮政”公司代理运输的文件的文件ID。

SQL: SELECT document_id FROM Documents WHERE document_status_code  =  "完结" AND document_type_code = "论文" EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "中国邮政";
问题: 列出不是由名为“中国邮政”运输代理且具有完成状态和“论文”类型运输的文件的文件ID。

SQL: SELECT document_id FROM Documents WHERE document_status_code  =  "完结" AND document_type_code = "论文" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "中国邮政";
问题: 文档ID为7的草稿信息是什么？

SQL: SELECT draft_details FROM Document_Drafts WHERE document_id = 7;
问题: ID为2的文件有多少份草稿？

SQL: SELECT count(*) FROM Draft_Copies WHERE document_id = 2;
问题: 哪份文件的草稿最多？列出其文件ID和草稿的数量。

SQL: SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;
问题: 哪些文件有超过1份草稿？列出文件ID和草稿的数量。

SQL: SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*)  >  1;
问题: 列出出现在文档id为1的流通文件上的员工的姓名。

SQL: SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;
问题: 列出没有出现在任何流通文件上的员工的姓名。

SQL: SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id
问题: 哪个雇员在流通文件中出现的最多。列出员工姓名、文件草稿和复印件的数量。

SQL: SELECT Employees.employee_name , count(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id , Circulation_History.draft_number , Circulation_History.copy_number ORDER BY count(*) DESC LIMIT 1;
问题: 对于每个文档，列出在该文档的流通史中出现的雇员人数、文档ID和员工数量。

SQL: SELECT document_id ,  count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;
问题: 按开始日期列出所有的部门名称。

SQL: SELECT dname FROM department ORDER BY mgr_start_date
问题: 找到所有与某个雇员有配偶关系的家属姓名。

SQL: SELECT Dependent_name FROM dependent WHERE relationship  =  '配偶'
问题: 有多少女性家属？

SQL: SELECT count(*) FROM dependent WHERE sex  =  '女'
问题: 查找位于休斯敦的部门名称。

SQL: SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber  =  t2.dnumber WHERE t2.dlocation  =  '武汉'
问题: 返回工资超过3万的员工的名字和姓氏。

SQL: SELECT fname ,  lname FROM employee WHERE salary  >  30000
问题: 找到每种性别工资低于50000的员工的人数。

SQL: SELECT count(*) ,  sex FROM employee WHERE salary  <  50000 GROUP BY sex
问题: 按出生日期的上升顺序列出所有员工的名字、姓氏和地址。

SQL: SELECT fname ,  lname ,  address FROM employee ORDER BY Bdate
问题: 类型代码为“结婚”的服务的时间信息是什么？

SQL: SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID  =  T2.Service_ID WHERE T2.Service_Type_Code  =  '结婚'
问题: 有多于一个参与者的活动的ID和信息是什么？

SQL: SELECT T1.event_id ,  T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID  =  T2.Event_ID GROUP BY T1.Event_ID HAVING count(*)  >  1
问题: 每个参与者参加了多少活动？列出参与者的ID、类型和数量。

SQL: SELECT T1.Participant_ID ,  T1.Participant_Type_Code ,  count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID  =  T2.Participant_ID GROUP BY T1.Participant_ID
问题: 所有参与者的ID、类型代码和详细信息是什么？

SQL: SELECT Participant_ID ,  Participant_Type_Code ,  Participant_Details FROM  Participants
问题: 有多少参与者属于“组织者”类型？

SQL: SELECT count(*) FROM participants WHERE participant_type_code  =  '组织者'
问题: 按字母顺序列出服务的类型。

SQL: SELECT service_type_code FROM services ORDER BY service_type_code
问题: 列出服务ID和活动的详细信息。

SQL: SELECT service_id ,  event_details FROM EVENTS
问题: 有多少有参与者的活动的详细信息中包含子串'博士'。

SQL: SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID  =  T2.Participant_ID WHERE T1.participant_details LIKE '博士'
问题: 参与者最多的类型是什么？

SQL: SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1
问题: 哪种服务ID和类型的参与者最少？

SQL: SELECT T3.service_id ,  T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID  =  T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID   =  T3.Event_ID JOIN services AS T4 ON T3.service_id  =  T4.service_id GROUP BY T3.service_id ORDER BY count(*) ASC LIMIT 1
问题: 参与者最多的活动ID是什么？

SQL: SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1
问题: 参与者的详细信息不包含“李强”的活动的id是什么？

SQL: SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID  =  T2.Participant_ID WHERE Participant_Details  =  '李强'
问题: 哪些服务类型既有成功活动又有失败的事件细节？

SQL: SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id  =  T2.service_id WHERE T2.event_details  =  '成功' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id  =  T2.service_id WHERE T2.event_details  =  '失败'
问题: 有多少事件没有参与者？

SQL: SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)
问题: 有哪些不同的参与者参加了活动？

SQL: SELECT count(DISTINCT participant_id) FROM participants_in_Events
问题: 最近举行的比赛叫什么名字？

SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
问题: 最近举办的比赛的名字是什么？

SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
问题: 最近一场比赛的名称和日期是什么？

SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
问题: 最近发生的比赛的名称和日期是什么？

SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
问题: 找出2017年举办的所有比赛的名字。

SQL: SELECT name FROM races WHERE YEAR = 2017
问题: 2017年举办的所有比赛的名字是什么？

SQL: SELECT name FROM races WHERE YEAR = 2017
问题: 找出2014到2017年间所有比赛的不同名称。

SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
问题: 2014年到2017年间所有比赛的不同名称是什么？

SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
问题: 列出单圈时间小于93000毫秒的所有不同的司机的名字和姓氏。

SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
问题: 所有单圈时间小于93000毫秒的不同司机的名字和姓氏是什么？

SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
问题: 找出所有单圈时间高于100000毫秒的司机的ID和国籍？

SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
问题: 单圈时间在100000毫秒以上的所有不同驾驶员的ID和国籍是什么？

SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
问题: 最小单圈时间的司机的名字和姓氏是什么？

SQL: SELECT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1
问题: 最短单圈时间的司机的名字和姓氏是什么？

SQL: SELECT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1
问题: 拥有最长单圈时间记录的司机的ID和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1
问题: 拥有单圈时间最长记录的司机的ID和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1
问题: 单圈时间有两次排名第一的司机的ID、名字和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION  =  '1' GROUP BY T1.driverid HAVING count(*)  >=  2
问题: 至少有两次到达单圈时间排名第一的司机的ID、名字和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION  =  '1' GROUP BY T1.driverid HAVING count(*)  >=  2
问题: 有多少司机参加了2009澳大利亚大奖赛？

SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "澳大利亚大奖赛" AND YEAR = 2009
问题: 在2009年举行的澳大利亚大奖赛中有多少车手？

SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "澳大利亚大奖赛" AND YEAR = 2009
问题: 有多少司机没有参加2009年的比赛？

SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
问题: 有多少司机在2009年没有参加比赛？

SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
问题: 给出名字是刘易斯的司机参赛的比赛名称和比赛的年份。

SQL: SELECT T2.name ,  T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "姚"
问题: 姓氏是刘易斯的司机参加的所有比赛的名称和年份是什么？

SQL: SELECT T2.name ,  T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "姚"
问题: 查找国籍为德国的司机的名字和姓氏？

SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "德国"
问题: 来自德国的司机的名字和姓氏是什么？

SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "德国"
问题: 请问参加过澳大利亚大奖赛和中国大奖赛的车手的ID和名字？

SQL: SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "澳大利亚大奖赛" INTERSECT SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "中国大奖赛"
问题: 参加澳大利亚大奖赛和中国大奖赛的所有车手的ID和名字是什么？

SQL: SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "澳大利亚大奖赛" INTERSECT SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "中国大奖赛"
问题: 参加过澳大利亚大奖赛但没有参加中国大奖赛的司机的名字和姓氏是什么？

SQL: SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "澳大利亚大奖赛" EXCEPT SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "中国大奖赛"
问题: 参加澳大利亚大奖赛但没参加中国大奖赛的所有车手的名字和姓氏是什么？

SQL: SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "澳大利亚大奖赛" EXCEPT SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "中国大奖赛"
问题: 找出所有位置是1并获胜的不同司机的名字？

SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
问题: 那些位置是1并获胜的车手的不同名字有什么？

SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
问题: 找出所有在1号位置获胜并得分超过20分以上的不同车手的姓氏？

SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
问题: 在1号位置获胜并获得20分以上的车手的名字是什么？

SQL: SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20
问题: 不同国家的制造商数量是多少？

SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
问题: 对于每个国家，有多少不同的制造商？

SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
问题: 每个制造商ID的竞赛数是多少？

SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
问题: 针对不同制造商ID的不同比赛数是多少？

SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
问题: 2017年之后在西班牙举行的赛事和赛道名称是什么？

SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "西班牙" AND T1.year > 2017
问题: 2017年以后在西班牙举行的比赛的名字是什么？

SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "西班牙" AND T1.year > 2017
问题: 2000年后在西班牙举行的赛事的不同的名字是什么？

SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "西班牙" AND T1.year > 2000
问题: 西班牙在2000年以后举行的所有比赛的名字是什么？

SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "西班牙" AND T1.year > 2000
问题: 找出ID为841的比赛中所有比一些车手停站时间更少的车手的ID和停站次数。

SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
问题: 在ID为841的比赛中，每个车手比一些车手停站时间更短的车手的ID和停站次数是多少？

SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
问题: 在ID841比赛中，找出所有车手停站时间比一些车手的停站时间长的不同的车手ID？

SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
问题: 在ID为841的比赛中，所有停车时间比某些车手更长的驾驶员的id和停车持续时间是什么？

SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
问题: 按字母顺序列出所有不同车手的名字。

SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
问题: 按字母顺序排列的不同驾驶员的名字是什么？

SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
问题: 按字典反序顺序列出所有不同比赛的名字？

SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
问题: 按字母反序顺序排列的所有比赛的不同名字是什么？

SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
问题: 2009到2011年间的比赛名称是什么？

SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
问题: 2009到2011年间所有比赛的名字是什么？

SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
问题: “12:00:00”之后或“09:00:00”之前的比赛名称是什么？

SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
问题: 12:00:00之后或09:00:00之前发生的所有比赛的名称是什么？

SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
问题: 有超过8次停站或参加超过5次比赛的司机的名字、姓氏和ID是什么？

SQL: SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  8 UNION SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5
问题: 超过8次停站或参加5场以上比赛的车手的名字、姓氏和ID是什么？

SQL: SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  8 UNION SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5
问题: 有11次停站并参加过5次以上的比赛车手的姓氏和ID是什么？

SQL: SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  =  11 INTERSECT SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5
问题: 参加过5次以上赛事且有11次停站的所有车手的姓氏和ID是什么？

SQL: SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  =  11 INTERSECT SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5
问题: 2010年后参加最多比赛的车手的ID和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1
问题: 2010年后参加比赛数量最多的车手的ID和姓氏是什么？

SQL: SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1
问题: 属于英国或马来西亚的环路名称是什么？

SQL: SELECT name FROM circuits WHERE country = "英国" OR country = "马来西亚"
问题: 英国或马来西亚的所有环路的名称是什么？

SQL: SELECT name FROM circuits WHERE country = "英国" OR country = "马来西亚"