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

Convert text to sql: How many different departments are there in each school that has less than 5 apartments? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( distinct _ ) , _ from _ group by _ having count ( distinct _ ) < _ | select count ( distinct dept_name ) , school_code from department group by school_code having count ( distinct dept_name ) < 5
### Instruction:

Convert text to sql: How many sections does each course has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , crs_code from class group by crs_code
### Instruction:

Convert text to sql: How many sections does each course have? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , crs_code from class group by crs_code
### Instruction:

Convert text to sql: What is the total credit does each department offer? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select sum ( _ ) , _ from _ group by _ | select sum ( crs_credit ) , dept_code from course group by dept_code
### Instruction:

Convert text to sql: How many credits does the department offer? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select sum ( _ ) , _ from _ group by _ | select sum ( crs_credit ) , dept_code from course group by dept_code
### Instruction:

Convert text to sql: Find the number of classes offered for all class rooms that held at least 2 classes. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ having count ( _ ) >= _ | select count ( * ) , class_room from class group by class_room having count ( * ) >= 2
### Instruction:

Convert text to sql: For each classroom with at least 2 classes, how many classes are offered? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ having count ( _ ) >= _ | select count ( * ) , class_room from class group by class_room having count ( * ) >= 2
### Instruction:

Convert text to sql: Find the number of classes in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from class join course on class.crs_code = course.crs_code group by dept_code
### Instruction:

Convert text to sql: How many classes are held in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from class join course on class.crs_code = course.crs_code group by dept_code
### Instruction:

Convert text to sql: Find the number of classes in each school. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from class join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by department.school_code
### Instruction:

Convert text to sql: How many classes exist for each school? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from class join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by department.school_code
### Instruction:

Convert text to sql: What is the number of professors for different school? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code
### Instruction:

Convert text to sql: How many different professors are there for the different schools? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code
### Instruction:

Convert text to sql: Find the count and code of the job has most employees. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select emp_jobcode , count ( * ) from employee group by emp_jobcode order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the count and code of the job with the most employee? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select emp_jobcode , count ( * ) from employee group by emp_jobcode order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which school has the smallest amount of professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Which school has the fewest professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: Find the number of professors with a Ph.D. degree in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dept_code from professor where prof_high_degree = 'Ph.D.' group by dept_code
### Instruction:

Convert text to sql: How many professors have a Ph.D. in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dept_code from professor where prof_high_degree = 'Ph.D.' group by dept_code