db_id
stringlengths 4
31
| text
stringlengths 370
4.84k
|
---|---|
music_4 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many music festivals have had each kind of result, ordered descending by count? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select result , count ( * ) from music_festival group by result order by count ( * ) desc |
music_4 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the issue dates of volumes associated with the artist aged 23 or younger? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 23 |
music_4 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Return the issue dates of volumes by artists who are at most 23 years old? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id |
### Response:
select issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 23 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: How many roller coasters are there? | 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 roller_coaster |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from roller_coaster order by length asc |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 length , height from roller_coaster |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from country where languages != 'German' |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 status from roller_coaster where length > 3300 or height > 100 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 speed from roller_coaster order by length desc limit 1 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( speed ) from roller_coaster |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 status , count ( * ) from roller_coaster group by status |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 status from roller_coaster group by status order by count ( * ) desc limit 1 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 status from roller_coaster group by status having count ( * ) > 2 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 park from roller_coaster order by speed desc limit 1 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 roller_coaster.name , country.name from country join roller_coaster on country.country_id = roller_coaster.country_id |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 country.name from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name having count ( * ) > 1 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 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 |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 country.name , avg ( roller_coaster.speed ) from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 country where country_id not in ( select country_id from roller_coaster where length > 3000 ) |
roller_coaster | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 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 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank ) from captain |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank ) from captain |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , rank from captain group by rank |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , rank from captain group by rank |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , rank from captain where age < 50 group by rank |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , rank from captain where age < 50 group by rank |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain order by age desc |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain order by age desc |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , class , rank from captain |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , class , rank from captain |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain group by rank order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain group by rank order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 class from captain group by class having count ( * ) > 2 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 class from captain group by class having count ( * ) > 2 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain where rank = 'Midshipman' or rank = 'Lieutenant' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain where rank = 'Midshipman' or rank = 'Lieutenant' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( age ) , min ( age ) , class from captain group by class |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( age ) , min ( age ) , class from captain group by class |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain except select rank from captain where class = 'Third-rate ship of the line' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 rank from captain except select rank from captain where class = 'Third-rate ship of the line' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain order by age asc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from captain order by age asc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ship |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ship |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , type , flag from ship order by built_year desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , type , flag from ship order by built_year desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , flag from ship group by flag |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ( * ) , flag from ship group by flag |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 flag from ship group by flag order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 flag from ship group by flag order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from ship order by built_year asc , class |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name from ship order by built_year asc , class |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 built_year from ship group by built_year order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 built_year from ship group by built_year order by count ( * ) desc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , class from ship where ship_id not in ( select ship_id from captain ) |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### 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 name , class from ship where ship_id not in ( select ship_id from captain ) |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name of the ship that is steered by 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 ship.name from ship join captain on ship.ship_id = captain.ship_id order by captain.age asc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the name of the ship that is commanded by 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 ship.name from ship join captain on ship.ship_id = captain.ship_id order by captain.age asc limit 1 |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name and flag of ships that are not steered by any captain with Midshipman 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 name , flag from ship where ship_id not in ( select ship_id from captain where rank = 'Midshipman' ) |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names and flags of ships that do not have a captain with the rank of Midshipman? | 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 name , flag from ship where ship_id not in ( select ship_id from captain where rank = 'Midshipman' ) |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant 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 ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Midshipman' intersect select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Lieutenant' |
ship_1 | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of 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 ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Midshipman' intersect select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Lieutenant' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is id of the city that hosted events in the most recent year? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select host_city from hosting_city order by year desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the city that hosted some events in the most recent year. What is the id of this city? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select host_city from hosting_city order by year desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the match ids of the cities that hosted competition "1994 FIFA World Cup qualification"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select match_id from match where competition = '1994 FIFA World Cup qualification' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the match id of the competition called "1994 FIFA World Cup qualification"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select match_id from match where competition = '1994 FIFA World Cup qualification' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the cities which were once a host city after 2010? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join hosting_city on city.city_id = hosting_city.host_city where hosting_city.year > 2010 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities served as a host city after 2010? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join hosting_city on city.city_id = hosting_city.host_city where hosting_city.year > 2010 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which city has hosted the most events? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city order by count ( * ) desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the city that hosted the most events. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city order by count ( * ) desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the venue of the competition "1994 FIFA World Cup qualification" hosted by "Nanjing ( Jiangsu )"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select match.venue from city join hosting_city on city.city_id = hosting_city.host_city join match on hosting_city.match_id = match.match_id where city.city = 'Nanjing ( Jiangsu )' and match.competition = '1994 FIFA World Cup qualification' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Find the venue of the competition "1994 FIFA World Cup qualification" which was hosted by "Nanjing ( Jiangsu )". | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select match.venue from city join hosting_city on city.city_id = hosting_city.host_city join match on hosting_city.match_id = match.match_id where city.city = 'Nanjing ( Jiangsu )' and match.competition = '1994 FIFA World Cup qualification' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give me the temperature of Shanghai in January. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select temperature.jan from city join temperature on city.city_id = temperature.city_id where city.city = 'Shanghai' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the temperature of "Shanghai" city in January? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select temperature.jan from city join temperature on city.city_id = temperature.city_id where city.city = 'Shanghai' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the host year of city "Taizhou ( Zhejiang )"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select hosting_city.year from city join hosting_city on city.city_id = hosting_city.host_city where city.city = 'Taizhou ( Zhejiang )' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: IN which year did city "Taizhou ( Zhejiang )" serve as a host city? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select hosting_city.year from city join hosting_city on city.city_id = hosting_city.host_city where city.city = 'Taizhou ( Zhejiang )' |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which three cities have the largest regional population? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city order by regional_population desc limit 3 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What are the three largest cities in terms of regional population? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city order by regional_population desc limit 3 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which city has the lowest GDP? Please list the city name and its GDP. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city , gdp from city order by gdp asc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: What is the city with the smallest GDP? Return the city and its GDP. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city , gdp from city order by gdp asc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which city has the highest temperature in February? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id order by temperature.feb desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: In February, which city marks the highest temperature? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id order by temperature.feb desc limit 1 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul or temperature.mar > temperature.oct |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities' temperature in March is lower than that in July or higher than that in Oct? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul or temperature.mar > temperature.oct |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul intersect select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities have lower temperature in March than in July and have been once host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul intersect select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.dec except select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities have lower temperature in March than in Dec and have never served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.dec except select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.feb > temperature.jun union select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities have higher temperature in Feb than in Jun or have once served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city.city from city join temperature on city.city_id = temperature.city_id where temperature.feb > temperature.jun union select city.city from city join hosting_city on city.city_id = hosting_city.host_city |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Please give me a list of cities whose regional population is over 10000000. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city where regional_population > 10000000 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities have regional population above 10000000? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city where regional_population > 10000000 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Please give me a list of cities whose regional population is over 8000000 or under 5000000. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000 |
city_record | Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Convert text to sql: Which cities have regional population above 8000000 or below 5000000? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id |
### Response:
select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.