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

Convert text to sql: What are the names of regions with two or more storms? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select region.region_name from region join affected_region on region.region_id = affected_region.region_id group by region.region_id having count ( * ) >= 2

### Instruction:

Convert text to sql: Find the names of the regions which were affected by the storm that killed the greatest number of people. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id order by storm.number_deaths desc limit 1

### Instruction:

Convert text to sql: What are the names of regions that were affected by the storm in which the most people died? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id order by storm.number_deaths desc limit 1

### Instruction:

Convert text to sql: Find the name of the storm that affected both Afghanistan and Albania regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Afghanistan' intersect select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Albania'
### Instruction:

Convert text to sql: What are the names of the storms that affected both the regions of Afghanistan and Albania? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | 

### Response:

select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Afghanistan' intersect select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Albania'
### Instruction:

Convert text to sql: How many counties are there in total? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( * ) from county

### Instruction:

Convert text to sql: Count the total number of counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( * ) from county

### Instruction:

Convert text to sql: Show the county name and population of all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select county_name , population from county

### Instruction:

Convert text to sql: What are the name and population of each county? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select county_name , population from county

### Instruction:

Convert text to sql: Show the average population of all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select avg ( population ) from county

### Instruction:

Convert text to sql: On average how large is the population of the counties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select avg ( population ) from county
### Instruction:

Convert text to sql: Return the maximum and minimum population among all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select max ( population ) , min ( population ) from county

### Instruction:

Convert text to sql: What are the maximum and minimum population of the counties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select max ( population ) , min ( population ) from county

### Instruction:

Convert text to sql: Show all the distinct districts for elections. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select distinct district from election

### Instruction:

Convert text to sql: What are the distinct districts for elections? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select distinct district from election

### Instruction:

Convert text to sql: Show the zip code of the county with name "Howard". | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select zip_code from county where county_name = 'Howard'

### Instruction:

Convert text to sql: What is the zip code the county named "Howard" is located in? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select zip_code from county where county_name = 'Howard'
### Instruction:

Convert text to sql: Show the delegate from district 1 in election. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select delegate from election where district = 1

### Instruction:

Convert text to sql: Who is the delegate of district 1 in the elections? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select delegate from election where district = 1

### Instruction:

Convert text to sql: Show the delegate and committee information of elections. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select delegate , committee from election

### Instruction:

Convert text to sql: What are the delegate and committee information for each election record? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select delegate , committee from election

### Instruction:

Convert text to sql: How many distinct governors are there? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( distinct governor ) from party

### Instruction:

Convert text to sql: Count the number of distinct governors. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( distinct governor ) from party
### Instruction:

Convert text to sql: Show the lieutenant governor and comptroller from the democratic party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select lieutenant_governor , comptroller from party where party = 'Democratic'

### Instruction:

Convert text to sql: Who are the lieutenant governor and comptroller from the democratic party? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select lieutenant_governor , comptroller from party where party = 'Democratic'

### Instruction:

Convert text to sql: In which distinct years was the governor "Eliot Spitzer"? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select distinct year from party where governor = 'Eliot Spitzer'

### Instruction:

Convert text to sql: Find the distinct years when the governor was named "Eliot Spitzer". | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select distinct year from party where governor = 'Eliot Spitzer'

### Instruction:

Convert text to sql: Show all the information about election. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select * from election

### Instruction:

Convert text to sql: Return all the information for each election record. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select * from election
### Instruction:

Convert text to sql: Show the delegates and the names of county they belong to. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate , county.county_name from county join election on county.county_id = election.district

### Instruction:

Convert text to sql: What are the delegate and name of the county they belong to, for each county? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate , county.county_name from county join election on county.county_id = election.district

### Instruction:

Convert text to sql: Which delegates are from counties with population smaller than 100000? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate from county join election on county.county_id = election.district where county.population < 100000

### Instruction:

Convert text to sql: Find the delegates who are from counties with population below 100000. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate from county join election on county.county_id = election.district where county.population < 100000

### Instruction:

Convert text to sql: How many distinct delegates are from counties with population larger than 50000? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( distinct election.delegate ) from county join election on county.county_id = election.district where county.population > 50000
### Instruction:

Convert text to sql: Count the number of distinct delegates who are from counties with population above 50000. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select count ( distinct election.delegate ) from county join election on county.county_id = election.district where county.population > 50000

### Instruction:

Convert text to sql: What are the names of the county that the delegates on "Appropriations" committee belong to? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select county.county_name from county join election on county.county_id = election.district where election.committee = 'Appropriations'

### Instruction:

Convert text to sql: Which county do the delegates on "Appropriations" committee belong to? Give me the county names. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select county.county_name from county join election on county.county_id = election.district where election.committee = 'Appropriations'

### Instruction:

Convert text to sql: Show the delegates and the names of the party they belong to. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate , party.party from election join party on election.party = party.party_id

### Instruction:

Convert text to sql: For each delegate, find the names of the party they are part of. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | 

### Response:

select election.delegate , party.party from election join party on election.party = party.party_id