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

Convert text to sql: What is the name of organization that has the greatest number of contact individuals? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select organizations.organization_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id group by organizations.organization_name order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Return the name of the organization which has the most contact individuals. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select organizations.organization_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id group by organizations.organization_name order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the last name of the individuals that have been contact individuals of an organization. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | 

### Response:

select distinct _ from _ | select distinct individuals.individual_last_name from individuals join organization_contact_individuals on individuals.individual_id = organization_contact_individuals.individual_id
### Instruction:

Convert text to sql: What are the last names of individuals who have been contact individuals for an organization? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | 

### Response:

select distinct _ from _ | select distinct individuals.individual_last_name from individuals join organization_contact_individuals on individuals.individual_id = organization_contact_individuals.individual_id
### Instruction:

Convert text to sql: How many drivers are there? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from driver
### Instruction:

Convert text to sql: Show the name, home city, and age for all drivers. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ | select name , home_city , age from driver
### Instruction:

Convert text to sql: Show the party and the number of drivers in each party. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select party , count ( * ) from driver group by party
### Instruction:

Convert text to sql: Show the name of drivers in descending order of age. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ order by _ desc | select name from driver order by age desc
### Instruction:

Convert text to sql: Show all different home cities. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select distinct _ from _ | select distinct home_city from driver
### Instruction:

Convert text to sql: Show the home city with the most number of drivers. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select home_city from driver group by home_city order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the party with drivers from Hartford and drivers older than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ where _ | select party from driver where home_city = 'Hartford' and age > 40
### Instruction:

Convert text to sql: Show home city where at least two drivers older than 40 are from. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ where _ group by _ having count ( _ ) >= _ | select home_city from driver where age > 40 group by home_city having count ( * ) >= 2
### Instruction:

Convert text to sql: Show all home cities except for those having a driver older than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ except select _ from _ where _ | select home_city from driver except select home_city from driver where age > 40
### Instruction:

Convert text to sql: Show the names of the drivers without a school bus. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from driver where driver_id not in ( select driver_id from school_bus )
### Instruction:

Convert text to sql: Show the types of schools that have two schools. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select type from school group by type having count ( * ) = 2
### Instruction:

Convert text to sql: Show the school name and driver name for all school buses. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ | select school.school , driver.name from school_bus join school on school_bus.school_id = school.school_id join driver on school_bus.driver_id = driver.driver_id
### Instruction:

Convert text to sql: What is the maximum, minimum and average years spent working on a school bus? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( years_working ) , min ( years_working ) , avg ( years_working ) from school_bus
### Instruction:

Convert text to sql: Show the school name and type for schools without a school bus. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select school , type from school where school_id not in ( select school_id from school_bus )
### Instruction:

Convert text to sql: Show the type of school and the number of buses for each type. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select school.type , count ( * ) from school_bus join school on school_bus.school_id = school.school_id group by school.type
### Instruction:

Convert text to sql: How many drivers are from Hartford city or younger than 40? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from driver where home_city = 'Hartford' or age < 40
### Instruction:

Convert text to sql: List names for drivers from Hartford city and younger than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ where _ | select name from driver where home_city = 'Hartford' and age < 40
### Instruction:

Convert text to sql: find the name of driver who is driving the school bus with the longest working history. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | 

### Response:

select _ from _ order by _ desc limit _ | select driver.name from driver join school_bus on driver.driver_id = school_bus.driver_id order by years_working desc limit 1
### Instruction:

Convert text to sql: How many flights have a velocity larger than 200? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from flight where velocity > 200
### Instruction:

Convert text to sql: List the vehicle flight number, date and pilot of all the flights, ordered by altitude. | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ order by _ asc | select vehicle_flight_number , date , pilot from flight order by altitude asc
### Instruction:

Convert text to sql: List the id, country, city and name of the airports ordered alphabetically by the name. | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ order by _ asc | select id , country , city , name from airport order by name asc
### Instruction:

Convert text to sql: What is maximum group equity shareholding of the companies? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select max ( _ ) from _ | select max ( group_equity_shareholding ) from operate_company
### Instruction:

Convert text to sql: What is the velocity of the pilot named 'Thompson'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select avg ( _ ) from _ where _ | select avg ( velocity ) from flight where pilot = 'Thompson'
### Instruction:

Convert text to sql: What are the names and types of the companies that have ever operated a flight? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ | select operate_company.name , operate_company.type from operate_company join flight on operate_company.id = flight.company_id
### Instruction:

Convert text to sql: What are the names of the airports which are not in the country 'Iceland'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ where _ | select name from airport where country != 'Iceland'
### Instruction:

Convert text to sql: What are the distinct types of the companies that have operated any flights with velocity less than 200? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select distinct _ from _ where _ | select distinct operate_company.type from operate_company join flight on operate_company.id = flight.company_id where flight.velocity < 200
### Instruction:

Convert text to sql: What are the ids and names of the companies that operated more than one flight? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select operate_company.id , operate_company.name from operate_company join flight on operate_company.id = flight.company_id group by operate_company.id having count ( * ) > 1
### Instruction:

Convert text to sql: What is the id, name and IATA code of the airport that had most number of flights? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select airport.id , airport.name , airport.iata from airport join flight on airport.id = flight.airport_id group by flight.id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select distinct _ from _ where _ | select distinct flight.pilot from airport join flight on airport.id = flight.airport_id where airport.country = 'United States' or airport.name = 'Billund Airport'
### Instruction:

Convert text to sql: What is the most common company type, and how many are there? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select type , count ( * ) from operate_company group by type order by count ( * ) desc limit 1