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

Convert text to sql: Show the distinct names of mountains climbed by climbers from country "West Germany". | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'

### Instruction:

Convert text to sql: What are the different names of mountains ascended by climbers from the country of West Germany? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'

### Instruction:

Convert text to sql: Show the times used by climbers to climb mountains in Country Uganda. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'

### Instruction:

Convert text to sql: What are the times used by climbers who climbed mountains in the country of Uganda? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'

### Instruction:

Convert text to sql: Please show the countries and the number of climbers from each country. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country , count ( * ) from climber group by country

### Instruction:

Convert text to sql: How many climbers are from each country? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country , count ( * ) from climber group by country

### Instruction:

Convert text to sql: List the countries that have more than one mountain. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country from mountain group by country having count ( * ) > 1
### Instruction:

Convert text to sql: Which countries have more than one mountain? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country from mountain group by country having count ( * ) > 1

### Instruction:

Convert text to sql: List the names of mountains that do not have any climber. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select name from mountain where mountain_id not in ( select mountain_id from climber )

### Instruction:

Convert text to sql: What are the names of countains that no climber has climbed? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select name from mountain where mountain_id not in ( select mountain_id from climber )

### Instruction:

Convert text to sql: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country from mountain where height > 5600 intersect select country from mountain where height < 5200

### Instruction:

Convert text to sql: What are the countries that have both mountains that are higher than 5600 and lower than 5200? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select country from mountain where height > 5600 intersect select country from mountain where height < 5200

### Instruction:

Convert text to sql: Show the range that has the most number of mountains. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select range from mountain group by range order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Which range contains the most mountains? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select range from mountain group by range order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the names of mountains with height more than 5000 or prominence more than 1000. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select name from mountain where height > 5000 or prominence > 1000
### Instruction:

Convert text to sql: What are the names of mountains that have a height of over 5000 or a prominence of over 1000? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | 

### Response:

select name from mountain where height > 5000 or prominence > 1000
### Instruction:

Convert text to sql: How many body builders are there? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select count ( * ) from body_builder

### Instruction:

Convert text to sql: List the total scores of body builders in ascending order. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select total from body_builder order by total asc

### Instruction:

Convert text to sql: List the snatch score and clean jerk score of body builders in ascending order of snatch score. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select snatch , clean_jerk from body_builder order by snatch asc

### Instruction:

Convert text to sql: What is the average snatch score of body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select avg ( snatch ) from body_builder

### Instruction:

Convert text to sql: What are the clean and jerk score of the body builder with the highest total score? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select clean_jerk from body_builder order by total desc limit 1

### Instruction:

Convert text to sql: What are the birthdays of people in ascending order of height? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select birth_date from people order by height asc

### Instruction:

Convert text to sql: What are the names of body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.name from body_builder join people on body_builder.people_id = people.people_id

### Instruction:

Convert text to sql: What are the names of body builders whose total score is higher than 300? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.name from body_builder join people on body_builder.people_id = people.people_id where body_builder.total > 300
### Instruction:

Convert text to sql: What is the name of the body builder with the greatest body weight? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.name from body_builder join people on body_builder.people_id = people.people_id order by people.weight desc limit 1

### Instruction:

Convert text to sql: What are the birth date and birth place of the body builder with the highest total points? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.birth_date , people.birth_place from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc limit 1

### Instruction:

Convert text to sql: What are the heights of body builders with total score smaller than 315? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.height from body_builder join people on body_builder.people_id = people.people_id where body_builder.total < 315

### Instruction:

Convert text to sql: What is the average total score of body builders with height bigger than 200? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select avg ( body_builder.total ) from body_builder join people on body_builder.people_id = people.people_id where people.height > 200

### Instruction:

Convert text to sql: What are the names of body builders in descending order of total scores? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.name from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc

### Instruction:

Convert text to sql: List each birth place along with the number of people from there. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select birth_place , count ( * ) from people group by birth_place

### Instruction:

Convert text to sql: What is the most common birth place of people? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select birth_place from people group by birth_place order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the birth places that are shared by at least two people? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select birth_place from people group by birth_place having count ( * ) >= 2

### Instruction:

Convert text to sql: List the height and weight of people in descending order of height. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select height , weight from people order by height desc

### Instruction:

Convert text to sql: Show all information about each body builder. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select * from body_builder

### Instruction:

Convert text to sql: List the names and origins of people who are not body builders. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select name , birth_place from people except select people.name , people.birth_place from people join body_builder on people.people_id = body_builder.people_id

### Instruction:

Convert text to sql: How many distinct birth places are there? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select count ( distinct birth_place ) from people

### Instruction:

Convert text to sql: How many persons are not body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select count ( * ) from people where people_id not in ( select people_id from body_builder )

### Instruction:

Convert text to sql: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select people.weight from body_builder join people on body_builder.people_id = people.people_id where body_builder.snatch > 140 or people.height > 200
### Instruction:

Convert text to sql: What are the total scores of the body builders whose birthday contains the string "January" ? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select body_builder.total from body_builder join people on body_builder.people_id = people.people_id where people.birth_date like '%January%'

### Instruction:

Convert text to sql: What is the minimum snatch score? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select min ( snatch ) from body_builder
### Instruction:

Convert text to sql: How many elections are there? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select count ( * ) from election

### Instruction:

Convert text to sql: List the votes of elections in descending order. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select votes from election order by votes desc

### Instruction:

Convert text to sql: List the dates and vote percents of elections. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select date , vote_percent from election

### Instruction:

Convert text to sql: What are the minimum and maximum vote percents of elections? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select min ( vote_percent ) , max ( vote_percent ) from election

### Instruction:

Convert text to sql: What are the names and parties of representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select name , party from representative

### Instruction:

Convert text to sql: What are the names of representatives whose party is not "Republican"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select name from representative where party != 'Republican'

### Instruction:

Convert text to sql: What are the life spans of representatives from New York state or Indiana state? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select lifespan from representative where state = 'New York' or state = 'Indiana'
### Instruction:

Convert text to sql: What are the names of representatives and the dates of elections they participated in. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select representative.name , election.date from election join representative on election.representative_id = representative.representative_id

### Instruction:

Convert text to sql: What are the names of representatives with more than 10000 votes in election? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select representative.name from election join representative on election.representative_id = representative.representative_id where votes > 10000

### Instruction:

Convert text to sql: What are the names of representatives in descending order of votes? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select representative.name from election join representative on election.representative_id = representative.representative_id order by votes desc

### Instruction:

Convert text to sql: What is the party of the representative that has the smallest number of votes. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select representative.party from election join representative on election.representative_id = representative.representative_id order by votes asc limit 1

### Instruction:

Convert text to sql: What are the lifespans of representatives in descending order of vote percent? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select representative.lifespan from election join representative on election.representative_id = representative.representative_id order by vote_percent desc

### Instruction:

Convert text to sql: What is the average number of votes of representatives from party "Republican"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select avg ( election.votes ) from election join representative on election.representative_id = representative.representative_id where representative.party = 'Republican'