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

Convert text to sql: What are the greatest and average capacity for rooms in each 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 max ( capacity ) , avg ( capacity ) , building from classroom group by building

### Instruction:

Convert text to sql: Find the title of the course that is offered by more than one department. | 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 title from course group by title having count ( * ) > 1
### Instruction:

Convert text to sql: What are the titles of courses that are offered in more than one department? | 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 title from course group by title having count ( * ) > 1

### Instruction:

Convert text to sql: Find the total credits of courses provided by different department. | 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 sum ( credits ) , dept_name from course group by dept_name
### Instruction:

Convert text to sql: How many total credits are offered by each department? | 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 sum ( credits ) , dept_name from course group by dept_name

### Instruction:

Convert text to sql: Find the minimum salary for the departments whose average salary is above the average payment of all instructors. | 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 min ( salary ) , dept_name from instructor group by dept_name having avg ( salary ) > ( select avg ( salary ) from instructor )
### Instruction:

Convert text to sql: What is the lowest salary in departments with average salary greater than the overall average. | 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 min ( salary ) , dept_name from instructor group by dept_name having avg ( salary ) > ( select avg ( salary ) from instructor )

### Instruction:

Convert text to sql: Find the number of courses provided in each semester and year. | 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 ( * ) , semester , year from section group by semester , year
### Instruction:

Convert text to sql: How many courses are provided in each semester and year? | 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 ( * ) , semester , year from section group by semester , year

### Instruction:

Convert text to sql: Find the year which offers the largest number of courses. | 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 year from section group by year order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which year had the greatest number of courses? | 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 year from section group by year order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Find the year and semester when offers the largest number of courses. | 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 semester , year from section group by semester , year order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the year and semester with the most courses? | 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 semester , year from section group by semester , year order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Find the name of department has the highest amount of 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 dept_name from student group by dept_name order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the name of the deparment with the highest enrollment? | 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 from student group by dept_name order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Find the total number of students in each department. | 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 ( * ) , dept_name from student group by dept_name