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

Convert text to sql: How many performances are there? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select count ( * ) from performance

### Instruction:

Convert text to sql: List the hosts of performances in ascending order of attendance. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select host from performance order by attendance asc

### Instruction:

Convert text to sql: What are the dates and locations of performances? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select date , location from performance

### Instruction:

Convert text to sql: Show the attendances of the performances at location "TD Garden" or "Bell Centre" | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select attendance from performance where location = 'TD Garden' or location = 'Bell Centre'

### Instruction:

Convert text to sql: What is the average number of attendees for performances? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select avg ( attendance ) from performance

### Instruction:

Convert text to sql: What is the date of the performance with the highest number of attendees? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select date from performance order by attendance desc limit 1
### Instruction:

Convert text to sql: Show different locations and the number of performances at each location. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select location , count ( * ) from performance group by location

### Instruction:

Convert text to sql: Show the most common location of performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select location from performance group by location order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the locations that have at least two performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select location from performance group by location having count ( * ) >= 2

### Instruction:

Convert text to sql: Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select location from performance where attendance > 2000 intersect select location from performance where attendance < 1000

### Instruction:

Convert text to sql: Show the names of members and the location of the performances they attended. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select member.name , performance.location from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id
### Instruction:

Convert text to sql: Show the names of members and the location of performances they attended in ascending alphabetical order of their names. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select member.name , performance.location from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id order by member.name asc

### Instruction:

Convert text to sql: Show the dates of performances with attending members whose roles are "Violin". | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select performance.date from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id where member.role = 'Violin'

### Instruction:

Convert text to sql: Show the names of members and the dates of performances they attended in descending order of attendance of the performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select member.name , performance.date from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id order by performance.attendance desc

### Instruction:

Convert text to sql: List the names of members who did not attend any performance. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | 

### Response:

select name from member where member_id not in ( select member_id from member_attendance )
### Instruction:

Convert text to sql: Find the buildings which have rooms with capacity more than 50. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select distinct building from classroom where capacity > 50

### Instruction:

Convert text to sql: What are the distinct buildings with capacities of greater than 50? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select distinct building from classroom where capacity > 50
### Instruction:

Convert text to sql: Count the number of rooms that are not in the Lamberton building. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select count ( * ) from classroom where building != 'Lamberton'

### Instruction:

Convert text to sql: How many classrooms are not in Lamberton? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select count ( * ) from classroom where building != 'Lamberton'
### Instruction:

Convert text to sql: What is the name and building of the departments whose budget is more than the average budget? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select dept_name , building from department where budget > ( select avg ( budget ) from department )

### Instruction:

Convert text to sql: Give the name and building of the departments with greater than average budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select dept_name , building from department where budget > ( select avg ( budget ) from department )
### Instruction:

Convert text to sql: Find the room number of the rooms which can sit 50 to 100 students and their buildings. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select building , room_number from classroom where capacity between 50 and 100

### Instruction:

Convert text to sql: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select building , room_number from classroom where capacity between 50 and 100
### Instruction:

Convert text to sql: Find the name and building of the department with the highest budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select dept_name , building from department order by budget desc limit 1

### Instruction:

Convert text to sql: What is the department name and corresponding building for the department with the greatest budget? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select dept_name , building from department order by budget desc limit 1