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

Convert text to sql: Find the distinct number of 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 count ( distinct president_vote ) from voting_record

### Instruction:

Convert text to sql: How many distinct president votes are recorded? | 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 ( distinct president_vote ) from voting_record

### Instruction:

Convert text to sql: Find the maximum age of all the students. | 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 max ( age ) from student

### Instruction:

Convert text to sql: What is the oldest age among the students? | 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 max ( age ) from student
### Instruction:

Convert text to sql: Find the last names of students with major 50. | 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 lname from student where major = 50

### Instruction:

Convert text to sql: What are the last names of students studying major 50? | 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 lname from student where major = 50

### Instruction:

Convert text to sql: Find the first names of students with age above 22. | 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 fname from student where age > 22

### Instruction:

Convert text to sql: What are the first names of all the students aged above 22? | 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 fname from student where age > 22
### Instruction:

Convert text to sql: What are the majors of male (sex is M) students? | 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 major from student where sex = 'M'

### Instruction:

Convert text to sql: List the major of each male student. | 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 major from student where sex = 'M'

### Instruction:

Convert text to sql: What is the average age of female (sex is F) students? | 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 ( age ) from student where sex = 'F'

### Instruction:

Convert text to sql: Find the average age of female students. | 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 ( age ) from student where sex = 'F'
### Instruction:

Convert text to sql: What are the maximum and minimum age of students with major 600? | 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 max ( age ) , min ( age ) from student where major = 600

### Instruction:

Convert text to sql: Tell me the ages of the oldest and youngest students studying major 600. | 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 max ( age ) , min ( age ) from student where major = 600

### Instruction:

Convert text to sql: Who are the advisors for students that live in a city with city code "BAL"? | 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 advisor from student where city_code = 'BAL'

### Instruction:

Convert text to sql: Show the advisors of the students whose city of residence has city code "BAL". | 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 advisor from student where city_code = 'BAL'
### Instruction:

Convert text to sql: What are the distinct 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 secretary_vote from voting_record where election_cycle = 'Fall'

### Instruction:

Convert text to sql: Return all the distinct secretary votes made 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 secretary_vote from voting_record where election_cycle = 'Fall'

### Instruction:

Convert text to sql: What are the distinct president votes on 08/30/2015? | 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 president_vote from voting_record where registration_date = '08/30/2015'

### Instruction:

Convert text to sql: Show all the distinct president votes made on 08/30/2015. | 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 president_vote from voting_record where registration_date = '08/30/2015'
### Instruction:

Convert text to sql: Report the distinct registration date and the 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 registration_date , election_cycle from voting_record

### Instruction:

Convert text to sql: What are the distinct registration dates and the election cycles? | 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 registration_date , election_cycle from voting_record

### Instruction:

Convert text to sql: Report the distinct president vote and the vice president vote. | 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 president_vote , vice_president_vote from voting_record

### Instruction:

Convert text to sql: List all the distinct president votes and the 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 president_vote , vice_president_vote from voting_record
### Instruction:

Convert text to sql: Find the distinct last names of the students who have class 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 student.lname from student join voting_record on student.stuid = voting_record.class_president_vote

### Instruction:

Convert text to sql: What are the distinct last names of the students who have class 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 student.lname from student join voting_record on student.stuid = voting_record.class_president_vote

### Instruction:

Convert text to sql: Find the distinct first names of the students who have class senator 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 student.fname from student join voting_record on student.stuid = voting_record.class_senator_vote
### Instruction:

Convert text to sql: What are the distinct first names of the students who have class 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 student.fname from student join voting_record on student.stuid = voting_record.class_senator_vote

### 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 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 student.age from student join voting_record on student.stuid = voting_record.secretary_vote where voting_record.election_cycle = 'Fall'