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

Convert text to sql: Show ids for all the male faculty. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select facid from faculty where sex = 'M'

### Instruction:

Convert text to sql: What are the faculty ids of all the male faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select facid from faculty where sex = 'M'

### Instruction:

Convert text to sql: How many female Professors do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select count ( * ) from faculty where sex = 'F' and rank = 'Professor'

### Instruction:

Convert text to sql: Count the number of female Professors we have. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select count ( * ) from faculty where sex = 'F' and rank = 'Professor'

### Instruction:

Convert text to sql: Show the phone, room, and building for the faculty named Jerry Prince. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select phone , room , building from faculty where fname = 'Jerry' and lname = 'Prince'
### Instruction:

Convert text to sql: What are the phone, room, and building of the faculty member called Jerry Prince? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select phone , room , building from faculty where fname = 'Jerry' and lname = 'Prince'

### Instruction:

Convert text to sql: How many Professors are in building NEB? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select count ( * ) from faculty where rank = 'Professor' and building = 'NEB'

### Instruction:

Convert text to sql: Count the number of Professors who have office in building NEB. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select count ( * ) from faculty where rank = 'Professor' and building = 'NEB'

### Instruction:

Convert text to sql: Show the first name and last name for all the instructors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select fname , lname from faculty where rank = 'Instructor'

### Instruction:

Convert text to sql: What are the first name and last name of all the instructors? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select fname , lname from faculty where rank = 'Instructor'
### Instruction:

Convert text to sql: Show all the buildings along with the number of faculty members the buildings have. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building , count ( * ) from faculty group by building

### Instruction:

Convert text to sql: How many faculty members does each building have? List the result with the name of the building. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building , count ( * ) from faculty group by building

### Instruction:

Convert text to sql: Which building has most faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building from faculty group by building order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Find the building that has the largest number of faculty members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building from faculty group by building order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show all the buildings that have at least 10 professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building from faculty where rank = 'Professor' group by building having count ( * ) >= 10

### Instruction:

Convert text to sql: In which buildings are there at least ten professors? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select building from faculty where rank = 'Professor' group by building having count ( * ) >= 10

### Instruction:

Convert text to sql: For each faculty rank, show the number of faculty members who have it. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank , count ( * ) from faculty group by rank

### Instruction:

Convert text to sql: How many faculty members do we have for each faculty rank? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank , count ( * ) from faculty group by rank

### Instruction:

Convert text to sql: Show all the ranks and the number of male and female faculty for each rank. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank , sex , count ( * ) from faculty group by rank , sex
### Instruction:

Convert text to sql: How many faculty members do we have for each rank and gender? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank , sex , count ( * ) from faculty group by rank , sex

### Instruction:

Convert text to sql: Which rank has the smallest number of faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank from faculty group by rank order by count ( * ) asc limit 1

### Instruction:

Convert text to sql: Find the faculty rank that has the least members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select rank from faculty group by rank order by count ( * ) asc limit 1

### Instruction:

Convert text to sql: Show the number of male and female assistant professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select sex , count ( * ) from faculty where rank = 'AsstProf' group by sex

### Instruction:

Convert text to sql: How many male and female assistant professors do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select sex , count ( * ) from faculty where rank = 'AsstProf' group by sex
### Instruction:

Convert text to sql: What are the first name and last name of Linda Smith's advisor? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor where student.fname = 'Linda' and student.lname = 'Smith'

### Instruction:

Convert text to sql: Who is the advisor of Linda Smith? Give me the first name and last name. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor where student.fname = 'Linda' and student.lname = 'Smith'

### Instruction:

Convert text to sql: Show the ids of students whose advisors are professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select student.stuid from faculty join student on faculty.facid = student.advisor where faculty.rank = 'Professor'

### Instruction:

Convert text to sql: Which students have professors as their advisors? Find their student ids. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select student.stuid from faculty join student on faculty.facid = student.advisor where faculty.rank = 'Professor'
### Instruction:

Convert text to sql: Show first name and last name for all the students advised by Michael Goodrich. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select student.fname , student.lname from faculty join student on faculty.facid = student.advisor where faculty.fname = 'Michael' and faculty.lname = 'Goodrich'

### Instruction:

Convert text to sql: Which students are advised by Michael Goodrich? Give me their first and last names. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select student.fname , student.lname from faculty join student on faculty.facid = student.advisor where faculty.fname = 'Michael' and faculty.lname = 'Goodrich'

### Instruction:

Convert text to sql: Show the faculty id of each faculty member, along with the number of students he or she advises. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.facid , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.facid

### Instruction:

Convert text to sql: What are the faculty id and the number of students each faculty has? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.facid , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.facid
### Instruction:

Convert text to sql: Show all the faculty ranks and the number of students advised by each rank. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.rank , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.rank

### Instruction:

Convert text to sql: How many students are advised by each rank of faculty? List the rank and the number of students. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.rank , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.rank

### Instruction:

Convert text to sql: What are the first and last name of the faculty who has the most students? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor group by faculty.facid order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Give me the the first and last name of the faculty who advises the most students. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | 

### Response:

select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor group by faculty.facid order by count ( * ) desc limit 1