aherntech/spider-syn huggingface dataset:
Database: pilot_record
Question: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.
Paraphrased question: What are the different countries of pilots? Show each country and the number of pilots of each country.
SQL: SELECT Nationality ,  COUNT(*) FROM pilot GROUP BY Nationality
Database: pilot_record
Question: Show the most common nationality of pilots.
Paraphrased question: Show the most common country of pilots.
SQL: SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: pilot_record
Question: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.
Paraphrased question: Show the pilot locations that have both pilots joining after year 2005 and pilots joining before 2000.
SQL: SELECT POSITION FROM pilot WHERE Join_Year	 <  2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year	 >  2005
Database: pilot_record
Question: Show the names of pilots and models of aircrafts they have flied with.
Paraphrased question: Show the names of aviators and types of aircrafts they have flied with.
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
Database: pilot_record
Question: Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.
Paraphrased question: Show the names of aviators and fleet series of the aircrafts they have flied with in ascending order of the rank of the aviator.
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
Database: pilot_record
Question: Show the fleet series of the aircrafts flied by pilots younger than 34
Paraphrased question: Show the fleet series of the aircrafts flied by pilots younger than 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
Database: pilot_record
Question: Show the names of pilots and the number of records they have.
Paraphrased question: Show the names of aviators and the number of records they have.
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
Database: pilot_record
Question: Show names of pilots that have more than one record.
Paraphrased question: Show names of aviators that have more than one record.
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
Database: pilot_record
Question: List the names of pilots that do not have any record.
Paraphrased question: List the names of aviator that do not have any record.
SQL: SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record)
Database: cre_Doc_Control_Systems
Question: What document status codes do we have?
Paraphrased question: What file status codes do we have?
SQL: SELECT document_status_code FROM Ref_Document_Status;
Database: cre_Doc_Control_Systems
Question: What is the description of document status code 'working'?
Paraphrased question: What is the describing content of file status code 'working'?
SQL: SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = "working";
Database: cre_Doc_Control_Systems
Question: What document type codes do we have?
Paraphrased question: What file type codes do we have?
SQL: SELECT document_type_code FROM Ref_Document_Types;
Database: cre_Doc_Control_Systems
Question: What is the description of document type 'Paper'?
Paraphrased question: What is the describing content of file type 'Paper'?
SQL: SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper";
Database: cre_Doc_Control_Systems
Question: What are the shipping agent names?
Paraphrased question: What are the shipping agent names?
SQL: SELECT shipping_agent_name FROM Ref_Shipping_Agents;
Database: cre_Doc_Control_Systems
Question: What is the shipping agent code of shipping agent UPS?
Paraphrased question: What is the shipping agent code of shipping agent UPS?
SQL: SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = "UPS";
Database: cre_Doc_Control_Systems
Question: What are all role codes?
Paraphrased question: What are all role codes?
SQL: SELECT role_code FROM ROLES;
Database: cre_Doc_Control_Systems
Question: What is the description of role code ED?
Paraphrased question: What is the describing content of role code ED?
SQL: SELECT role_description FROM ROLES WHERE role_code = "ED";
Database: cre_Doc_Control_Systems
Question: How many employees do we have?
Paraphrased question: How many staffs do we have?
SQL: SELECT count(*) FROM Employees;
Database: cre_Doc_Control_Systems
Question: What is the role of the employee named Koby?
Paraphrased question: What is the role of the employee named Koby?
SQL: SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby";
Database: cre_Doc_Control_Systems
Question: List all document ids and receipt dates of documents.
Paraphrased question: List all file ids and receipt dates of files.
SQL: SELECT document_id ,  receipt_date FROM Documents;
Database: cre_Doc_Control_Systems
Question: How many employees does each role have? List role description, id and number of employees.
Paraphrased question: How many employees does each role have? List role describing content, id and number of employees.
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;
Database: cre_Doc_Control_Systems
Question: List roles that have more than one employee. List the role description and number of employees.
Paraphrased question: List roles that have more than one employee. List the role describing content and number of employees.
SQL: SELECT Roles.role_description , count(distinct Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING count(distinct Employees.employee_id)  >  1;
Database: cre_Doc_Control_Systems
Question: What is the document status description of the document with id 1?
Paraphrased question: What is the file status describing content of the file with 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;
Database: cre_Doc_Control_Systems
Question: How many documents have the status code done?
Paraphrased question: How many files have the status code done?
SQL: SELECT count(*) FROM Documents WHERE document_status_code = "done";
Database: cre_Doc_Control_Systems
Question: List the document type code for the document with the id 2.
Paraphrased question: List the file type code for the file with the id 2.
SQL: SELECT document_type_code FROM Documents WHERE document_id = 2;
Database: cre_Doc_Control_Systems
Question: List the document ids for any documents with the status code done and the type code paper.
Paraphrased question: List the file ids for any files with the status code done and the type code paper.
SQL: SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper";
Database: cre_Doc_Control_Systems
Question: What is the name of the shipping agent of the document with id 2?
Paraphrased question: What is the name of the shipping agent of the document with 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;
Database: cre_Doc_Control_Systems
Question: How many documents were shipped by USPS?
Paraphrased question: How many files were shipped by USPS?
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 = "USPS";
Database: cre_Doc_Control_Systems
Question: Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.
Paraphrased question: Which shipping agent shipped the most files? List the shipping agent name and the number of files.
SQL: SELECT Ref_Shipping_Agents.shipping_agent_name , count(distinct 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(distinct Documents.document_id) DESC LIMIT 1;
Database: cre_Doc_Control_Systems
Question: What is the receipt date of the document with id 3?
Paraphrased question: What is the receipt day of the file with id 3?
SQL: SELECT receipt_date FROM Documents WHERE document_id = 3;
Database: cre_Doc_Control_Systems
Question: What address was the document with id 4 mailed to?
Paraphrased question: What locations was the file with id 4 mailed to?
SQL: SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;
Database: cre_Doc_Control_Systems
Question: What is the mail date of the document with id 7?
Paraphrased question: What is the mail day of the file with id 7?
SQL: SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;
Database: cre_Doc_Control_Systems
Question: List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.
Paraphrased question: List the file ids of files with the status done and type Paper, which not shipped by the shipping agent named USPS.
SQL: SELECT document_id FROM Documents WHERE document_status_code  =  "done" AND document_type_code = "Paper" 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 = "USPS";
Database: cre_Doc_Control_Systems
Question: List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.
Paraphrased question: List file id of files status is done and file type is Paper and the file is shipped by shipping agent named USPS.
SQL: SELECT document_id FROM Documents WHERE document_status_code  =  "done" AND document_type_code = "Paper" 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 = "USPS";
Database: cre_Doc_Control_Systems
Question: What is draft detail of the document with id 7?
Paraphrased question: What is draft detail of the file with id 7?
SQL: SELECT draft_details FROM Document_Drafts WHERE document_id = 7;
Database: cre_Doc_Control_Systems
Question: How many draft copies does the document with id 2 have?
Paraphrased question: How many draft copies does the file with id 2 have?
SQL: SELECT count(*) FROM Draft_Copies WHERE document_id = 2;
Database: cre_Doc_Control_Systems
Question: Which document has the most draft copies? List its document id and number of draft copies.
Paraphrased question: Which file has the most draft copies? List its file id and number of draft copies.
SQL: SELECT document_id , count(distinct copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(distinct copy_number) DESC LIMIT 1;
Database: cre_Doc_Control_Systems
Question: Which documents have more than 1 draft copies? List document id and number of draft copies.
Paraphrased question: Which files have more than 1 draft copies? List file id and number of draft copies.
SQL: SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*)  >  1;
Database: cre_Doc_Control_Systems
Question: List all employees in the circulation history of the document with id 1. List the employee's name.
Paraphrased question: List all staffs in the circulation history of the document with id 1. List the staff's name.
SQL: SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;
Database: cre_Doc_Control_Systems
Question: List the employees who have not showed up in any circulation history of documents. List the employee's name.
Paraphrased question: List the staffs who have not showed up in any circulation history of documents. List the staff's name.
SQL: SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id
Database: cre_Doc_Control_Systems
Question: Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.
Paraphrased question: Which staff has showed up in most circulation history documents. List the staff's name and the number of drafts and copies.
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;
Database: cre_Doc_Control_Systems
Question: For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.
Paraphrased question: For each file, list the number of employees who have showed up in the circulation history of that file. List the file ids and number of employees.
SQL: SELECT document_id ,  count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;
Database: company_1
Question: List all department names ordered by their starting date.
Paraphrased question: List all division names ordered by their starting date.
SQL: SELECT dname FROM department ORDER BY mgr_start_date
Database: company_1
Question: find all dependent names who have a spouse relation with some employee.
Paraphrased question: find all dependent names who have a spouse relation with some employee.
SQL: SELECT Dependent_name FROM dependent WHERE relationship  =  'Spouse'
Database: company_1
Question: how many female dependents are there?
Paraphrased question: how many female dependents are there?
SQL: SELECT count(*) FROM dependent WHERE sex  =  'F'
Database: company_1
Question: Find the names of departments that are located in Houston.
Paraphrased question: Find the names of divisions that are located in Houston.
SQL: SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber  =  t2.dnumber WHERE t2.dlocation  =  'Houston'
Database: company_1
Question: Return the first names and last names of employees who earn more than 30000 in salary.
Paraphrased question: Return the full name of employees who earn more than 30000 in salary.
SQL: SELECT fname ,  lname FROM employee WHERE salary  >  30000
Database: company_1
Question: Find the number of employees of each gender whose salary is lower than 50000.
Paraphrased question: Find the number of staffs of each gender whose salary is lower than 50000.
SQL: SELECT count(*) ,  sex FROM employee WHERE salary  <  50000 GROUP BY sex
Database: company_1
Question: list the first and last names, and the addresses of all employees in the ascending order of their birth date.
Paraphrased question: list the full name, and the addresses of all employees in the ascending order of their birth date.
SQL: SELECT fname ,  lname ,  address FROM employee ORDER BY Bdate
Database: local_govt_in_alabama
Question: what are the event details of the services that have the type code 'Marriage'?
Paraphrased question: what are the event information of the services that have the type code 'Marriage'?
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  =  'Marriage'
Database: local_govt_in_alabama
Question: What are the ids and details of events that have more than one participants?
Paraphrased question: What are the ids and information of events that have more than one participants?
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
Database: local_govt_in_alabama
Question: How many events have each participants attended? List the participant id, type and the number.
Paraphrased question: How many events have each participators attended? List the participator id, type and the number.
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
Database: local_govt_in_alabama
Question: What are all the the participant ids, type code and details?
Paraphrased question: What are all the the participator ids, type code and information?
SQL: SELECT Participant_ID ,  Participant_Type_Code ,  Participant_Details FROM  Participants
Database: local_govt_in_alabama
Question: How many participants belong to the type 'Organizer'?
Paraphrased question: How many participators belong to the type 'Organizer'?
SQL: SELECT count(*) FROM participants WHERE participant_type_code  =  'Organizer'
Database: local_govt_in_alabama
Question: List the type of the services in alphabetical order.
Paraphrased question: List the type of the services in alphabetical order.
SQL: SELECT service_type_code FROM services ORDER BY service_type_code
Database: local_govt_in_alabama
Question: List the service id and details for the events.
Paraphrased question: List the service id and information for the events.
SQL: SELECT service_id ,  event_details FROM EVENTS
Database: local_govt_in_alabama
Question: How many events had participants whose details had the substring 'Dr.'
Paraphrased question: How many events had participants whose information had the substring 'Dr.'
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 '%Dr.%'
Database: local_govt_in_alabama
Question: What is the most common participant type?
Paraphrased question: What is the most common participator type?
SQL: SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1
Database: local_govt_in_alabama
Question: Which service id and type has the least number of participants?
Paraphrased question: Which service id and type has the least number of participators?
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
Database: local_govt_in_alabama
Question: What is the id of the event with the most participants?
Paraphrased question: What is the id of the event with the most participators?
SQL: SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1
Database: local_govt_in_alabama
Question: Which events id does not have any participant with detail 'Kenyatta Kuhn'?
Paraphrased question: Which events id does not have any participant with detail 'Kenyatta Kuhn'?
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  =  'Kenyatta Kuhn'
Database: local_govt_in_alabama
Question: Which services type had both successful and failure event details?
Paraphrased question: Which services type had both successful and failure event 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  =  'Success' 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  =  'Fail'
Database: local_govt_in_alabama
Question: How many events did not have any participants?
Paraphrased question: How many events did not have any participants?
SQL: SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)
Database: local_govt_in_alabama
Question: What are all the distinct participant ids who attended any events?
Paraphrased question: What are all the different participator ids who attended any events?
SQL: SELECT count(DISTINCT participant_id) FROM participants_in_Events
Database: formula_1
Question: What is the name of the race held most recently?
Paraphrased question: What is the name of the race held most recently?
SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
Database: formula_1
Question: What is the name of the race that occurred most recently?
Paraphrased question: What is the name of the race that occurred most recently?
SQL: SELECT name FROM races ORDER BY date DESC LIMIT 1
Database: formula_1
Question: What is the name and date of the most recent race?
Paraphrased question: What is the name and day of the most recent race?
SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
Database: formula_1
Question: What is the name and date of the race that occurred most recently?
Paraphrased question: What is the name and day of the race that occurred most recently?
SQL: SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1
Database: formula_1
Question: Find the names of all races held in 2017.
Paraphrased question: Find the names of all races held in 2017.
SQL: SELECT name FROM races WHERE YEAR = 2017
Database: formula_1
Question: What are the names of all the races that occurred in the year 2017?
Paraphrased question: What are the names of all the races that occurred in the year 2017?
SQL: SELECT name FROM races WHERE YEAR = 2017
Database: formula_1
Question: Find the distinct names of all races held between 2014 and 2017?
Paraphrased question: Find the different names of all races held between 2014 and 2017?
SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
Database: formula_1
Question: What are the unique names of all race held between 2014 and 2017?
Paraphrased question: What are the unique names of all race held between 2014 and 2017?
SQL: SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017
Database: formula_1
Question: List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?
Paraphrased question: List the first name and last name of all distinct drivers who once had laptime less than 93000 milliseconds?
SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
Database: formula_1
Question: What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?
Paraphrased question: What are the first name and last name of all unique drivers who had a lap time of less than 93000 milliseconds?
SQL: SELECT DISTINCT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
Database: formula_1
Question: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?
Paraphrased question: Find all the different id and nationality of drivers who have had laptime more than 100000 milliseconds?
SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
Database: formula_1
Question: What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?
Paraphrased question: What are the different driver ids and nation of all drivers who had a laptime of more than 100000 milliseconds?
SQL: SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000
Database: formula_1
Question: What are the forename and surname of the driver who has the smallest laptime?
Paraphrased question: What are the first name and family name of the driver who has the smallest laptime?
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
Database: formula_1
Question: What is the forename and surname of the driver with the shortest laptime?
Paraphrased question: What is the first name and family name of the driver with the shortest laptime?
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
Database: formula_1
Question: What is the id and family name of the driver who has the longest laptime?
Paraphrased question: What is the id and family name of the driver who has the longest laptime?
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
Database: formula_1
Question: What is the id and last name of the driver with the longest laptime?
Paraphrased question: What is the id and last name of the driver with the longest laptime?
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
Database: formula_1
Question: What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?
Paraphrased question: What is the id, full name of the driver who had the first position in terms of laptime at least twice?
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
Database: formula_1
Question: What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?
Paraphrased question: What is the id, full name of the driver who was in the first position for laptime at least twice?
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
Database: formula_1
Question: How many drivers participated in the race Australian Grand Prix held in 2009?
Paraphrased question: How many drivers participated in the race Australian Grand Prix held in 2009?
SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "Australian Grand Prix" AND YEAR = 2009
Database: formula_1
Question: How many drivers were in the Australian Grand Prix held in 2009?
Paraphrased question: How many drivers were in the Australian Grand Prix held in 2009?
SQL: SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "Australian Grand Prix" AND YEAR = 2009
Database: formula_1
Question: How many drivers did not participate in the races held in 2009?
Paraphrased question: How many drivers did not participate in the races held in 2009?
SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
Database: formula_1
Question: How many drivers did not race in 2009?
Paraphrased question: How many drivers did not race in 2009?
SQL: SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )
Database: formula_1
Question: Give me a list of names and years of races that had any driver whose forename is Lewis?
Paraphrased question: Give me a list of names and years of races that had any driver whose forename is Lewis?
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 = "Lewis"
Database: formula_1
Question: What are the names and years of all races that had a driver with the last name Lewis?
Paraphrased question: What are the names and years of all races that had a driver with the last name Lewis?
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 = "Lewis"
Database: formula_1
Question: Find the forename and surname of drivers whose nationality is German?
Paraphrased question: Find the first name and family name of drivers whose nationality is German?
SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "German"
Database: formula_1
Question: What is the first and last name of all the German drivers?
Paraphrased question: What is the first and last name of all the German drivers?
SQL: SELECT forename ,  surname FROM drivers WHERE nationality = "German"
Database: formula_1
Question: Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?
Paraphrased question: Find the id and first names of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?
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 = "Australian Grand Prix" 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 = "Chinese Grand Prix"
Database: formula_1
Question: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?
Paraphrased question: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?
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 = "Australian Grand Prix" 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 = "Chinese Grand Prix"
Database: formula_1
Question: What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?
Paraphrased question: What are the full name of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?
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 = "Australian Grand Prix" 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 = "Chinese Grand Prix"
Database: formula_1
Question: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?
Paraphrased question: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?
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 = "Australian Grand Prix" 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 = "Chinese Grand Prix"
Database: formula_1
Question: Find all the forenames of distinct drivers who was in position 1 as standing and won?
Paraphrased question: Find all the forenames of different drivers who was in position 1 as standing and won?
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
Database: formula_1
Question: What are all the different first names of the drivers who are in position as standing and won?
Paraphrased question: What are all the different first names of the drivers who are in position as standing and won?
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
Database: formula_1
Question: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?
Paraphrased question: Find all the first name of different drivers who won in position 1 as driver standing and had more than 20 points?
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
Database: formula_1
Question: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?
Paraphrased question: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?
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
Database: formula_1
Question: What are the numbers of constructors for different nationalities?
Paraphrased question: What are the numbers of constructors for different nations?
SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
Database: formula_1
Question: For each nationality, how many different constructors are there?
Paraphrased question: For each nation, how many different constructors are there?
SQL: SELECT count(*) ,  nationality FROM constructors GROUP BY nationality
Database: formula_1
Question: What are the numbers of races for each constructor id?
Paraphrased question: What are the numbers of races for each constructor id?
SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
Database: formula_1
Question: For each constructor id, how many races are there?
Paraphrased question: For each constructor id, how many races are there?
SQL: SELECT count(*) ,  constructorid FROM constructorStandings GROUP BY constructorid
Database: formula_1
Question: What are the names of races that were held after 2017 and the circuits were in the country of Spain?
Paraphrased question: What are the names of races that were held after 2017 and the circuits were in the country of Spain?
SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
Database: formula_1
Question: What are the names of the races held after 2017 in Spain?
Paraphrased question: What are the names of the races held after 2017 in Spain?
SQL: SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017
Database: formula_1
Question: What are the unique names of races that held after 2000 and the circuits were in Spain?
Paraphrased question: What are the unique names of races that held after 2000 and the circuits were in Spain?
SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2000
Database: formula_1
Question: What are the names of all races held after 2000 in Spain?
Paraphrased question: What are the names of all races held after 2000 in Spain?
SQL: SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2000
Database: formula_1
Question: Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.
Paraphrased question: Find the different driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1
Question: What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?
Paraphrased question: What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1
Question: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?
Paraphrased question: Find the different driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1
Question: What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?
Paraphrased question: What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?
SQL: SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)
Database: formula_1
Question: List the forenames of all distinct drivers in alphabetical order?
Paraphrased question: List the first names of all different drivers in alphabetical order?
SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
Database: formula_1
Question: What are the first names of all the different drivers in alphabetical order?
Paraphrased question: What are the first names of all the different drivers in alphabetical order?
SQL: SELECT DISTINCT forename FROM drivers ORDER BY forename ASC
Database: formula_1
Question: List the names of all distinct races in reversed  lexicographic order?
Paraphrased question: List the names of all different races in reversed  lexicographic order?
SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
Database: formula_1
Question: What are the different names of all the races in reverse alphabetical order?
Paraphrased question: What are the different names of all the races in reverse alphabetical order?
SQL: SELECT DISTINCT name FROM races ORDER BY name DESC
Database: formula_1
Question: What are the names of races held between 2009 and 2011?
Paraphrased question: What are the names of races held between 2009 and 2011?
SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
Database: formula_1
Question: What are the names of all races held between 2009 and 2011?
Paraphrased question: What are the names of all races held between 2009 and 2011?
SQL: SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011
Database: formula_1
Question: What are the names of races held after 12:00:00 or before 09:00:00?
Paraphrased question: What are the names of races held after 12:00:00 or before 09:00:00?
SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
Database: formula_1
Question: What are the names of all races that occurred after 12:00:00 or before 09:00:00?
Paraphrased question: What are the names of all races that occurred after 12:00:00 or before 09:00:00?
SQL: SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
Database: formula_1
Question: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?
Paraphrased question: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?
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
Database: formula_1
Question: What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?
Paraphrased question: What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?
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
Database: formula_1
Question: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?
Paraphrased question: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?
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
Database: formula_1
Question: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?
Paraphrased question: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?
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
Database: formula_1
Question: What is the id and last name of the driver who participated in the most races after 2010?
Paraphrased question: What is the id and last name of the driver who participated in the most races after 2010?
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
Database: formula_1
Question: What are the names of circuits that belong to UK or Malaysia?
Paraphrased question: What are the names of circuits that belong to UK or Malaysia?
SQL: SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia"
Database: formula_1
Question: What are the names of all the circuits that are in the UK or Malaysia?
Paraphrased question: What are the names of all the circuits that are in the UK or Malaysia?
SQL: SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia"
Database: formula_1
Question: Find the id and location of circuits that belong to France or Belgium?
Paraphrased question: Find the id and city of circuits that belong to France or Belgium?
SQL: SELECT circuitid ,  LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"
Database: formula_1
Question: What are the ids and locations of all circuits in France or Belgium?
Paraphrased question: What are the ids and cities of all circuits in France or Belgium?
SQL: SELECT circuitid ,  LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"
Database: formula_1
Question: Find the names of Japanese constructors that have once earned more than 5 points?
Paraphrased question: Find the names of Japanese constructors that have once earned more than 5 points?
SQL: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5
Database: formula_1
Question: What are the names of all the Japanese constructors that have earned more than 5 points?
Paraphrased question: What are the names of all the Japanese constructors that have earned more than 5 points?
SQL: SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = "Japanese" AND T2.points > 5
Database: formula_1
Question: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
Paraphrased question: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
SQL: SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"
Database: formula_1
Question: What is the average fastest lap speed for the Monaco Grand Prix in 2008?
Paraphrased question: What is the average fastest lap speed for the Monaco Grand Prix in 2008?
SQL: SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"
Database: formula_1
Question: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
Paraphrased question: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?
SQL: SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"
Database: formula_1
Question: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?
Paraphrased question: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?
SQL: SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"
Database: formula_1
Question: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?
Paraphrased question: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL: SELECT max(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?
Paraphrased question: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?
SQL: SELECT max(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
Paraphrased question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL: SELECT avg(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: What is the average fastest lap speed for races held after 2004, for each race, ordered by year?
Paraphrased question: What is the average fastest lap speed for races held after 2004, for each race, ordered by year?
SQL: SELECT avg(T2.fastestlapspeed) ,  T1.name ,  T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year
Database: formula_1
Question: Find the id, forename and number of races of all drivers who have at least participated in two races?
Paraphrased question: Find the id, first name and number of races of all drivers who have at least participated in two races?
SQL: SELECT T1.driverid ,  T1.forename ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  >=  2
Database: formula_1
Question: What is the id, forename, and number of races for all drivers that have participated in at least 2 races?
Paraphrased question: What is the id, first name, and number of races for all drivers that have participated in at least 2 races?
SQL: SELECT T1.driverid ,  T1.forename ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  >=  2