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

Convert text to sql: Who were the governors of the parties associated with delegates from district 1? | 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 party.governor from election join party on election.party = party.party_id where election.district = 1

### Instruction:

Convert text to sql: Find the parties associated with the delegates from district 1. Who served as governors of the parties? | 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 party.governor from election join party on election.party = party.party_id where election.district = 1

### Instruction:

Convert text to sql: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2? | 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 party.comptroller from election join party on election.party = party.party_id where election.district = 1 or election.district = 2

### Instruction:

Convert text to sql: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties? | 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 party.comptroller from election join party on election.party = party.party_id where election.district = 1 or election.district = 2

### Instruction:

Convert text to sql: Return all the committees that have delegates from 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 election.committee from election join party on election.party = party.party_id where party.party = 'Democratic'
### Instruction:

Convert text to sql: Which committees have delegates 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 election.committee from election join party on election.party = party.party_id where party.party = 'Democratic'

### Instruction:

Convert text to sql: Show the name of each county along with the corresponding number of delegates from that 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.county_name , count ( * ) from county join election on county.county_id = election.district group by county.county_id

### Instruction:

Convert text to sql: For each county, find the name of the county and the number of delegates from that 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.county_name , count ( * ) from county join election on county.county_id = election.district group by county.county_id

### Instruction:

Convert text to sql: Show the name of each party and the corresponding number of delegates from that 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 party.party , count ( * ) from election join party on election.party = party.party_id group by election.party

### Instruction:

Convert text to sql: For each party, return the name of the party and the number of delegates from that 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 party.party , count ( * ) from election join party on election.party = party.party_id group by election.party
### Instruction:

Convert text to sql: Return the names of all counties sorted by population in ascending order. | 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 from county order by population asc

### Instruction:

Convert text to sql: Sort the names of all counties in ascending order of population. | 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 from county order by population asc

### Instruction:

Convert text to sql: Return the names of all counties sorted by county name in descending alphabetical order. | 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 from county order by county_name desc

### Instruction:

Convert text to sql: Sort the names of all counties in descending alphabetical order. | 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 from county order by county_name desc

### Instruction:

Convert text to sql: Show the name of the county with the biggest population. | 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 from county order by population desc limit 1
### Instruction:

Convert text to sql: Which county has the largest population? Give me the name of the 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 from county order by population desc limit 1

### Instruction:

Convert text to sql: Show the 3 counties with the smallest population. | 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 from county order by population asc limit 3

### Instruction:

Convert text to sql: What are the 3 counties that have the smallest population? 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_name from county order by population asc limit 3

### Instruction:

Convert text to sql: Show the names of counties that have at least two delegates. | 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 group by county.county_id having count ( * ) >= 2

### Instruction:

Convert text to sql: Which counties have two or more delegates? 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 group by county.county_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the name of the party that has at least two records. | 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 party from party group by party having count ( * ) >= 2

### Instruction:

Convert text to sql: Which party has two or more records? | 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 party from party group by party having count ( * ) >= 2

### Instruction:

Convert text to sql: Show the name of the party that has the most delegates. | 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 party.party from election join party on election.party = party.party_id group by election.party order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Which party has the largest number of delegates? | 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 party.party from election join party on election.party = party.party_id group by election.party order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the people that have been governor the most times. | 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 governor from party group by governor order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which people severed as governor most frequently? | 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 governor from party group by governor order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the people that have been comptroller the most times and the corresponding number of times. | 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 comptroller , count ( * ) from party group by comptroller order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Which people severed as comptroller most frequently? Give me the name of the person and the frequency count. | 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 comptroller , count ( * ) from party group by comptroller order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What are the names of parties that do not have delegates 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 party from party where party_id not in ( select party from election )

### Instruction:

Convert text to sql: Which parties did not have any delegates in 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 party from party where party_id not in ( select party from election )
### Instruction:

Convert text to sql: What are the names of parties that have both delegates on "Appropriations" committee and | 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 party.party from election join party on election.party = party.party_id where election.committee = 'Appropriations' intersect select party.party from election join party on election.party = party.party_id where election.committee = 'Economic Matters'

### Instruction:

Convert text to sql: Which parties have delegates in both the "Appropriations" committee and the "Economic Matters" committee? | 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 party.party from election join party on election.party = party.party_id where election.committee = 'Appropriations' intersect select party.party from election join party on election.party = party.party_id where election.committee = 'Economic Matters'

### Instruction:

Convert text to sql: Which committees have delegates from both democratic party and liberal 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 election.committee from election join party on election.party = party.party_id where party.party = 'Democratic' intersect select election.committee from election join party on election.party = party.party_id where party.party = 'Liberal'

### Instruction:

Convert text to sql: Find the committees that have delegates both from from the democratic party and the liberal 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 election.committee from election join party on election.party = party.party_id where party.party = 'Democratic' intersect select election.committee from election join party on election.party = party.party_id where party.party = 'Liberal'
### Instruction:

Convert text to sql: How many journalists are there? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select count ( * ) from journalist

### Instruction:

Convert text to sql: List the names of journalists in ascending order of years working. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select name from journalist order by years_working asc

### Instruction:

Convert text to sql: What are the nationalities and ages of journalists? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select nationality , age from journalist

### Instruction:

Convert text to sql: Show the names of journalists from "England" or "Wales". | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select name from journalist where nationality = 'England' or nationality = 'Wales'

### Instruction:

Convert text to sql: What is the average number of years spent working as a journalist? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select avg ( years_working ) from journalist

### Instruction:

Convert text to sql: What is the nationality of the journalist with the largest number of years working? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | 

### Response:

select nationality from journalist order by years_working desc limit 1