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

Convert text to sql: What is the name of the aircraft that was on flight number 99? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from flight join aircraft on flight.aid = aircraft.aid where flight.flno = 99

### Instruction:

Convert text to sql: Show all flight numbers with aircraft Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'

### Instruction:

Convert text to sql: What are the flight numbers for the aircraft Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'

### Instruction:

Convert text to sql: Show aircraft names and number of flights for each aircraft. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid

### Instruction:

Convert text to sql: What is the name of each aircraft and how many flights does each one complete? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid

### Instruction:

Convert text to sql: Show names for all aircraft with at least two flights. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2
### Instruction:

Convert text to sql: What are the names for all aircrafts with at least 2 flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2

### Instruction:

Convert text to sql: How many employees have certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select count ( distinct eid ) from certificate

### Instruction:

Convert text to sql: What is the count of distinct employees with certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select count ( distinct eid ) from certificate

### Instruction:

Convert text to sql: Show ids for all employees who don't have a certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select eid from employee except select eid from certificate

### Instruction:

Convert text to sql: What are the ids of all employees that don't have certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select eid from employee except select eid from certificate

### Instruction:

Convert text to sql: Show names for all aircrafts of which John Williams has certificates. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'
### Instruction:

Convert text to sql: What are the names of all aircrafts that John Williams have certificates to be able to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'

### Instruction:

Convert text to sql: Show names for all employees who have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'

### Instruction:

Convert text to sql: What are the names of all employees who have a certificate to fly Boeing 737-800? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'

### Instruction:

Convert text to sql: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'
### Instruction:

Convert text to sql: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'

### Instruction:

Convert text to sql: Show names for all employees who do not have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'

### Instruction:

Convert text to sql: What are the names of all employees who are not certified to fly Boeing 737-800s? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'

### Instruction:

Convert text to sql: Show the name of aircraft which fewest people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What are the names of the aircraft that the least people are certified to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc

### Instruction:

Convert text to sql: What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc

### Instruction:

Convert text to sql: what is the salary and name of the employee who has the most number of aircraft certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the salaray and name of the employee that is certified to fly the most planes? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the salaray and name of the employee with the most certificates to fly planes more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | 

### Response:

select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: How many allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( distinct allergy ) from allergy_type

### Instruction:

Convert text to sql: How many allergy entries are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( distinct allergy ) from allergy_type

### Instruction:

Convert text to sql: How many different allergy types exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( distinct allergytype ) from allergy_type

### Instruction:

Convert text to sql: How many distinct allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( distinct allergytype ) from allergy_type

### Instruction:

Convert text to sql: Show all allergy types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select distinct allergytype from allergy_type

### Instruction:

Convert text to sql: What are the different allergy types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select distinct allergytype from allergy_type

### Instruction:

Convert text to sql: Show all allergies and their types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergy , allergytype from allergy_type

### Instruction:

Convert text to sql: What are the allergies and their types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergy , allergytype from allergy_type
### Instruction:

Convert text to sql: Show all allergies with type food. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select distinct allergy from allergy_type where allergytype = 'food'

### Instruction:

Convert text to sql: What are all the different food allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select distinct allergy from allergy_type where allergytype = 'food'

### Instruction:

Convert text to sql: What is the type of allergy Cat? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergytype from allergy_type where allergy = 'Cat'

### Instruction:

Convert text to sql: What is allergy type of a cat allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergytype from allergy_type where allergy = 'Cat'

### Instruction:

Convert text to sql: How many allergies have type animal? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( * ) from allergy_type where allergytype = 'animal'

### Instruction:

Convert text to sql: How many animal type allergies exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select count ( * ) from allergy_type where allergytype = 'animal'

### Instruction:

Convert text to sql: Show all allergy types and the number of allergies in each type. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergytype , count ( * ) from allergy_type group by allergytype

### Instruction:

Convert text to sql: What are the allergy types and how many allergies correspond to each one? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | 

### Response:

select allergytype , count ( * ) from allergy_type group by allergytype