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

Convert text to sql: Find the distinct ages of students who have secretary votes in the fall election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.age from student join voting_record on student.stuid = voting_record.secretary_vote where voting_record.election_cycle = 'Fall'
### Instruction:

Convert text to sql: What are the distinct ages of students who have secretary votes in the fall election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.age from student join voting_record on student.stuid = voting_record.secretary_vote where voting_record.election_cycle = 'Fall'
### Instruction:

Convert text to sql: Find the distinct Advisor of students who have treasurer votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.advisor from student join voting_record on student.stuid = voting_record.treasurer_vote where voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Who served as an advisor for students who have treasurer votes in the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.advisor from student join voting_record on student.stuid = voting_record.treasurer_vote where voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Find the distinct majors of students who have treasurer votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ | select distinct student.major from student join voting_record on student.stuid = voting_record.treasurer_vote
### Instruction:

Convert text to sql: What are the distinct majors that students with treasurer votes are studying? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ | select distinct student.major from student join voting_record on student.stuid = voting_record.treasurer_vote
### Instruction:

Convert text to sql: Find the first and last names of all the female (sex is F) students who have president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.president_vote where student.sex = 'F'
### Instruction:

Convert text to sql: What are the first and last names of all the female students who have president votes? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.president_vote where student.sex = 'F'
### Instruction:

Convert text to sql: Find the first and last name of all the students of age 18 who have vice president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.vice_president_vote where student.age = 18
### Instruction:

Convert text to sql: What are the first names and last names of the students who are 18 years old and have vice president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.vice_president_vote where student.age = 18
### Instruction:

Convert text to sql: How many male (sex is M) students have class senator votes in the fall election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.sex = 'M' and voting_record.election_cycle = 'Fall'
### Instruction:

Convert text to sql: Count the number of male students who had class senator votes in the fall election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.sex = 'M' and voting_record.election_cycle = 'Fall'
### Instruction:

Convert text to sql: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Which students live in the city with code "NYC" and have class senator votes in the spring election cycle? Count the numbers. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Find the average age of students who live in the city with code "NYC" and have secretary votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: What is the average age of students who have city code "NYC" and have secretary votes for the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.sex = 'F' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: What is the average age of the female students with secretary votes in the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.sex = 'F' and voting_record.election_cycle = 'Spring'
### Instruction:

Convert text to sql: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ except select distinct _ from _ where _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.vice_president_vote except select distinct fname from student where city_code = 'PIT'
### Instruction:

Convert text to sql: What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ except select distinct _ from _ where _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.vice_president_vote except select distinct fname from student where city_code = 'PIT'
### Instruction:

Convert text to sql: Find the distinct last names of all the students who have president votes and whose advisor is not 2192. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ except select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote except select distinct lname from student where advisor = '2192'
### Instruction:

Convert text to sql: What are the distinct last names of the students who have president votes but do not have 2192 as the advisor? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ except select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote except select distinct lname from student where advisor = '2192'
### Instruction:

Convert text to sql: Find the distinct last names of all the students who have president votes and whose advisor is 8741. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ intersect select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote intersect select distinct lname from student where advisor = '8741'
### Instruction:

Convert text to sql: What are the distinct last names of the students who have president votes and have 8741 as the advisor? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select distinct _ from _ intersect select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote intersect select distinct lname from student where advisor = '8741'
### Instruction:

Convert text to sql: For each advisor, report the total number of students advised by him or her. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

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

Convert text to sql: How many students does each advisor have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | 

### Response:

select _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor