richardr1126/spider-skeleton-context-instruct huggingface dataset:
### 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 _ from _ where _ not in ( select _ from _ ) | 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 _ from _ where _ not in ( select _ from _ ) | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ from _ where _ intersect select _ from _ where _ | 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 _ | 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 _ from _ order by _ asc | 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 _ from _ | 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 _ from _ where _ | 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 ( _ ) from _ | 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 _ from _ order by _ desc limit _ | select nationality from journalist order by years_working desc limit 1
### Instruction:

Convert text to sql: Show the different nationalities and the number of journalists of each nationality. | 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 _ group by _ | select nationality , count ( * ) from journalist group by nationality
### Instruction:

Convert text to sql: Show the most common nationality for 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 _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from journalist group by nationality order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of 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 _ from _ where _ intersect select _ from _ where _ | select nationality from journalist where years_working > 10 intersect select nationality from journalist where years_working < 3
### Instruction:

Convert text to sql: Show the dates, places, and names of events in descending order of the attendance. | 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 _ from _ order by _ desc | select date , name , venue from event order by event_attendance desc
### Instruction:

Convert text to sql: Show the names of journalists and the dates of the events they reported. | 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 _ from _ | select journalist.name , event.date from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id
### Instruction:

Convert text to sql: Show the names of journalists and the names of the events they reported in ascending order | 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 _ from _ order by _ asc | select journalist.name , event.name from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id order by event.event_attendance asc
### Instruction:

Convert text to sql: Show the names of journalists and the number of events they reported. | 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 _ group by _ | select journalist.name , count ( * ) from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id group by journalist.name
### Instruction:

Convert text to sql: Show the names of journalists that have reported more than one event. | 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 _ from _ group by _ having count ( _ ) > _ | select journalist.name from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id group by journalist.name having count ( * ) > 1
### Instruction:

Convert text to sql: List the names of journalists who have not reported any event. | 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 _ from _ where _ not in ( select _ from _ ) | select name from journalist where journalist_id not in ( select journalist_id from news_report )
### Instruction:

Convert text to sql: what are the average and maximum attendances of all events? | 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 ( _ ) , max ( _ ) from _ | select avg ( event_attendance ) , max ( event_attendance ) from event
### Instruction:

Convert text to sql: Find the average age and experience working length of journalists working on different role type. | 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 ( _ ) , avg ( _ ) , _ from _ group by _ | select avg ( journalist.age ) , avg ( years_working ) , news_report.work_type from journalist join news_report on journalist.journalist_id = news_report.journalist_id group by news_report.work_type
### Instruction:

Convert text to sql: List the event venues and names that have the top 2 most number of people attended. | 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 _ from _ order by _ desc limit _ | select venue , name from event order by event_attendance desc limit 2
### Instruction:

Convert text to sql: Show me all the restaurants. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ | select resname from restaurant
### Instruction:

Convert text to sql: What is the address of the restaurant Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select address from restaurant where resname = 'Subway'
### Instruction:

Convert text to sql: What is the rating of the restaurant Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select rating from restaurant where resname = 'Subway'
### Instruction:

Convert text to sql: List all restaurant types. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ | select restypename from restaurant_type
### Instruction:

Convert text to sql: What is the description of the restaurant type Sandwich? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select restypedescription from restaurant_type where restypename = 'Sandwich'
### Instruction:

Convert text to sql: Which restaurants have highest rating? List the restaurant name and its rating. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ order by _ desc limit _ | select resname , rating from restaurant order by rating desc limit 1
### Instruction:

Convert text to sql: What is the age of student Linda Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select age from student where fname = 'Linda' and lname = 'Smith'
### Instruction:

Convert text to sql: What is the gender of the student Linda Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select sex from student where fname = 'Linda' and lname = 'Smith'
### Instruction:

Convert text to sql: List all students' first names and last names who majored in 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select fname , lname from student where major = 600
### Instruction:

Convert text to sql: Which city does student Linda Smith live in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ from _ where _ | select city_code from student where fname = 'Linda' and lname = 'Smith'
### Instruction:

Convert text to sql: Advisor 1121 has how many students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from student where advisor = 1121
### Instruction:

Convert text to sql: Which Advisor has most of students? List advisor and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select advisor , count ( * ) from student group by advisor order by count ( advisor ) desc limit 1
### Instruction:

Convert text to sql: Which major has least number of students? List the major and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select major , count ( * ) from student group by major order by count ( major ) asc limit 1
### Instruction:

Convert text to sql: Which major has between 2 and 30 number of students? List major and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | 

### Response:

select _ , count ( _ ) from _ group by _ having count ( _ ) between _ and _ | select major , count ( * ) from student group by major having count ( major ) between 2 and 30