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

Convert text to sql: List the names of roller coasters by ascending order of length. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ order by _ asc | select name from roller_coaster order by length asc
### Instruction:

Convert text to sql: What are the lengths and heights of roller coasters? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ | select length , height from roller_coaster
### Instruction:

Convert text to sql: List the names of countries whose language is not "German". | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ where _ | select name from country where languages != 'German'
### Instruction:

Convert text to sql: Show the statuses of roller coasters longer than 3300 or higher than 100. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ where _ | select status from roller_coaster where length > 3300 or height > 100
### Instruction:

Convert text to sql: What are the speeds of the longest roller coaster? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ order by _ desc limit _ | select speed from roller_coaster order by length desc limit 1
### Instruction:

Convert text to sql: What is the average speed of roller coasters? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select avg ( _ ) from _ | select avg ( speed ) from roller_coaster
### Instruction:

Convert text to sql: Show the different statuses and the numbers of roller coasters for each status. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select status , count ( * ) from roller_coaster group by status
### Instruction:

Convert text to sql: Please show the most common status of roller coasters. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

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

Convert text to sql: List the status shared by more than two roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select status from roller_coaster group by status having count ( * ) > 2
### Instruction:

Convert text to sql: Show the park of the roller coaster with the highest speed. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ order by _ desc limit _ | select park from roller_coaster order by speed desc limit 1
### Instruction:

Convert text to sql: Show the names of roller coasters and names of country they are in. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ | select roller_coaster.name , country.name from country join roller_coaster on country.country_id = roller_coaster.country_id
### Instruction:

Convert text to sql: Show the names of countries that have more than one roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select country.name from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name having count ( * ) > 1
### Instruction:

Convert text to sql: Show the name and population of the country that has the highest roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ order by _ desc limit _ | select country.name , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id order by roller_coaster.height desc limit 1
### Instruction:

Convert text to sql: Show the names of countries and the average speed of roller coasters from each country. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ , avg ( _ ) from _ group by _ | select country.name , avg ( roller_coaster.speed ) from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name
### Instruction:

Convert text to sql: How many countries do not have an roller coaster longer than 3000? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from country where country_id not in ( select country_id from roller_coaster where length > 3000 )
### Instruction:

Convert text to sql: What are the country names, area and population which has both roller coasters with speed higher | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select country.name , country.area , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id where roller_coaster.speed > 60 intersect select country.name , country.area , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id where roller_coaster.speed < 55
### Instruction:

Convert text to sql: How many different captain ranks are there? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct rank ) from captain
### Instruction:

Convert text to sql: Count the number of different ranks of captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct rank ) from captain
### Instruction:

Convert text to sql: How many captains are in each rank? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , rank from captain group by rank
### Instruction:

Convert text to sql: Count the number of captains that have each rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , rank from captain group by rank
### Instruction:

Convert text to sql: How many captains with younger than 50 are in each rank? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , rank from captain where age < 50 group by rank
### Instruction:

Convert text to sql: Count the number of captains younger than 50 of each rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , rank from captain where age < 50 group by rank
### Instruction:

Convert text to sql: Sort all captain names by their ages from old to young. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: What are the names of captains, sorted by age descending? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Find the name, class and rank of all captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ | select name , class , rank from captain
### Instruction:

Convert text to sql: What are the names, classes, and ranks of all captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ | select name , class , rank from captain
### Instruction:

Convert text to sql: Which rank is the most common among captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Return the rank for which there are the fewest captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Which classes have more than two captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select class from captain group by class having count ( * ) > 2
### Instruction:

Convert text to sql: Give the classes that have more than two captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select class from captain group by class having count ( * ) > 2
### Instruction:

Convert text to sql: Find the name of captains whose rank are either Midshipman or Lieutenant. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'
### Instruction:

Convert text to sql: What are the names of captains that have either the rank Midshipman or Lieutenant? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'
### Instruction:

Convert text to sql: What are the average and minimum age of captains in different class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( age ) , min ( age ) , class from captain group by class
### Instruction:

Convert text to sql: Return the average and minimum age of captains in each class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( age ) , min ( age ) , class from captain group by class
### Instruction:

Convert text to sql: Find the captain rank that has some captains in both Cutter and Armed schooner classes. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'
### Instruction:

Convert text to sql: What are the ranks of captains that are both in the Cutter and Armed schooner classes? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'
### Instruction:

Convert text to sql: Find the captain rank that has no captain in Third-rate ship of the line class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ except select _ from _ where _ | select rank from captain except select rank from captain where class = 'Third-rate ship of the line'
### Instruction:

Convert text to sql: What are the ranks of captains that have no captain that are in the Third-rate ship of the line class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ except select _ from _ where _ | select rank from captain except select rank from captain where class = 'Third-rate ship of the line'
### Instruction:

Convert text to sql: What is the name of the youngest captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc limit _ | select name from captain order by age asc limit 1
### Instruction:

Convert text to sql: Return the name of the youngest captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc limit _ | select name from captain order by age asc limit 1
### Instruction:

Convert text to sql: how many ships are there? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Count the number of ships. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Find the name, type, and flag of the ship that is built in the most recent year. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , type , flag from ship order by built_year desc limit 1
### Instruction:

Convert text to sql: What is the name, type, and flag of the ship that was built in the most recent year? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , type , flag from ship order by built_year desc limit 1
### Instruction:

Convert text to sql: Group by ships by flag, and return number of ships that have each flag. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , flag from ship group by flag
### Instruction:

Convert text to sql: What are the different ship flags, and how many ships have each? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , flag from ship group by flag
### Instruction:

Convert text to sql: Which flag is most widely used among all ships? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Return the flag that is most common among all ships. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: List all ship names in the order of built year and class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc , _ | select name from ship order by built_year asc , class
### Instruction:

Convert text to sql: What are the names of ships, ordered by year they were built and their class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc , _ | select name from ship order by built_year asc , class
### Instruction:

Convert text to sql: Find the ship type that are used by both ships with Panama and Malta flags. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'
### Instruction:

Convert text to sql: What types of ships have both ships that have Panama Flags and Malta flags? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'
### Instruction:

Convert text to sql: In which year were most of ships built? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: What is the year in which most ships were built? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

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

Convert text to sql: Find the name of the ships that have more than one captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1
### Instruction:

Convert text to sql: What are the names of ships that have more than one captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1
### Instruction:

Convert text to sql: what are the names and classes of the ships that do not have any captain yet? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name , class from ship where ship_id not in ( select ship_id from captain )
### Instruction:

Convert text to sql: Return the names and classes of ships that do not have a captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name , class from ship where ship_id not in ( select ship_id from captain )