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

Convert text to sql: What is the name and city of the airport from most of the routes start? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select airports.name , airports.city , routes.src_apid from airports join routes on airports.apid = routes.src_apid group by routes.src_apid order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the number of different airports which are the destinations of the American Airlines. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct dst_apid ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'
### Instruction:

Convert text to sql: What is the number of different different airports that are destinations for American Airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( distinct _ ) from _ where _ | select count ( distinct dst_apid ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'
### Instruction:

Convert text to sql: Which countries has the most number of airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

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

Convert text to sql: What is the name of the country with the most number of home airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

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

Convert text to sql: Which countries has the most number of airlines whose active status is 'Y'? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from airlines where active = 'Y' group by country order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the countries with the most airlines whose active status is Y? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from airlines where active = 'Y' group by country order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: List all countries and their number of airlines in the descending order of number of airlines. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select country , count ( * ) from airlines group by country order by count ( * ) desc
### Instruction:

Convert text to sql: How many airlines operate out of each country in descending order? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select country , count ( * ) from airlines group by country order by count ( * ) desc
### Instruction:

Convert text to sql: How many airports are there per country? Order the countries by decreasing number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , country from airports group by country order by count ( * ) desc
### Instruction:

Convert text to sql: What is the number of airports per country, ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , country from airports group by country order by count ( * ) desc
### Instruction:

Convert text to sql: How many airports are there per city in the United States? Order the cities by decreasing number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ where _ group by _ order by count ( _ ) desc | select count ( * ) , city from airports where country = 'United States' group by city order by count ( * ) desc
### Instruction:

Convert text to sql: How many airports are there per city in the US ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ where _ group by _ order by count ( _ ) desc | select count ( * ) , city from airports where country = 'United States' group by city order by count ( * ) desc
### Instruction:

Convert text to sql: Return the cities with more than 3 airports in the United States. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ where _ group by _ having count ( _ ) > _ | select city from airports where country = 'United States' group by city having count ( * ) > 3
### Instruction:

Convert text to sql: What is the number of cities in the United States with more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ where _ group by _ having count ( _ ) > _ | select city from airports where country = 'United States' group by city having count ( * ) > 3
### Instruction:

Convert text to sql: How many cities are there that have more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from ( select _ from _ group by _ having count ( _ ) > _ ) | select count ( * ) from ( select city from airports group by city having count ( * ) > 3 )
### Instruction:

Convert text to sql: What is the count of cities with more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from ( select _ from _ group by _ having count ( _ ) > _ ) | select count ( * ) from ( select city from airports group by city having count ( * ) > 3 )
### Instruction:

Convert text to sql: List the cities which have more than one airport and number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select city , count ( * ) from airports group by city having count ( * ) > 1
### Instruction:

Convert text to sql: What are the names of all cities with more than one airport and how many airports do they have? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select city , count ( * ) from airports group by city having count ( * ) > 1
### Instruction:

Convert text to sql: List the cities which have more than 2 airports sorted by the number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ group by _ having count ( _ ) > _ order by count ( _ ) asc | select city from airports group by city having count ( * ) > 2 order by count ( * ) asc
### Instruction:

Convert text to sql: What are the cities that have more than 2 airports sorted by number of airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ from _ group by _ having count ( _ ) > _ order by count ( _ ) asc | select city from airports group by city having count ( * ) > 2 order by count ( * ) asc
### Instruction:

Convert text to sql: Find the number of routes for each source airport and the airport name. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name
### Instruction:

Convert text to sql: For each airport name, how many routes start at that airport? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name
### Instruction:

Convert text to sql: Find the number of routes and airport name for each source airport, order the results by decreasing number of routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name order by count ( * ) desc
### Instruction:

Convert text to sql: For each  airport name, how many routes start at that airport, ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name order by count ( * ) desc
### Instruction:

Convert text to sql: Find the average elevation of all airports for each country. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select avg ( _ ) , _ from _ group by _ | select avg ( elevation ) , country from airports group by country
### Instruction:

Convert text to sql: For each country, what is the average elevation of that country's airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select avg ( _ ) , _ from _ group by _ | select avg ( elevation ) , country from airports group by country
### Instruction:

Convert text to sql: Find the cities which have exactly two airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

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

Convert text to sql: What are the cities with exactly two airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

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

Convert text to sql: For each country and airline name, how many routes are there? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ | select airlines.country , airlines.name , count ( * ) from airlines join routes on airlines.alid = routes.alid group by airlines.country , airlines.name
### Instruction:

Convert text to sql: What is the total number of routes for each country and airline in that country? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select _ , count ( _ ) from _ group by _ | select airlines.country , airlines.name , count ( * ) from airlines join routes on airlines.alid = routes.alid group by airlines.country , airlines.name
### Instruction:

Convert text to sql: Find the number of routes with destination airports in Italy. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid where airports.country = 'Italy'
### Instruction:

Convert text to sql: What is the number of routes whose destinations are Italian airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid where airports.country = 'Italy'
### Instruction:

Convert text to sql: Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid join airlines on routes.alid = airlines.alid where airports.country = 'Italy' and airlines.name = 'American Airlines'
### Instruction:

Convert text to sql: What is the number of routes operated by the airline American Airlines whose destinations are in Italy? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid join airlines on routes.alid = airlines.alid where airports.country = 'Italy' and airlines.name = 'American Airlines'
### Instruction:

Convert text to sql: Find the number of routes that have destination John F Kennedy International Airport. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where airports.name = 'John F Kennedy International Airport'
### Instruction:

Convert text to sql: What is the number of routes that end at John F Kennedy International Airport? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where airports.name = 'John F Kennedy International Airport'
### Instruction:

Convert text to sql: Find the number of routes from the United States to Canada. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | 

### Response:

select count ( _ ) from _ where _ in ( select _ from _ where _ ) and _ in ( select _ from _ where _ ) | select count ( * ) from routes where dst_apid in ( select apid from airports where country = 'Canada' ) and src_apid in ( select apid from airports where country = 'United States' )