richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: What is the average fastest lap speed for races held after 2004, for each race, ordered by year? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select avg ( results.fastestlapspeed ) , races.name , races.year from races join results on races.raceid = results.raceid where races.year > 2014 group by races.name order by races.year asc
### Instruction:

Convert text to sql: Find the id, forename and number of races of all drivers who have at least participated in two races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , drivers.forename , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) >= 2
### Instruction:

Convert text to sql: What is the id, forename, and number of races for all drivers that have participated in at least 2 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , drivers.forename , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) >= 2
### Instruction:

Convert text to sql: Find the driver id and number of races of all drivers who have at most participated in 30 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) <= 30
### Instruction:

Convert text to sql: For each id of a driver who participated in at most 30 races, how many races did they participate in? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) <= 30
### Instruction:

Convert text to sql: Find the id and surname of the driver who participated the most number of races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the ids and last names of all drivers who participated in the most races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | 

### Response:

select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: How many technicians are there? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select count ( * ) from technician

### Instruction:

Convert text to sql: What is the number of technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select count ( * ) from technician

### Instruction:

Convert text to sql: List the names of technicians in ascending order of age. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician order by age asc

### Instruction:

Convert text to sql: What are the names of the technicians by ascending order of age? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician order by age asc

### Instruction:

Convert text to sql: What are the team and starting year of technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select team , starting_year from technician
### Instruction:

Convert text to sql: What is the team and starting year for each technician? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select team , starting_year from technician

### Instruction:

Convert text to sql: List the name of technicians whose team is not "NYY". | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician where team != 'NYY'

### Instruction:

Convert text to sql: What is the name of the technician whose team is not 'NYY'? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician where team != 'NYY'

### Instruction:

Convert text to sql: Show the name of technicians aged either 36 or 37 | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician where age = 36 or age = 37

### Instruction:

Convert text to sql: What are the names of the technicians aged either 36 or 37? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | 

### Response:

select name from technician where age = 36 or age = 37