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

Convert text to sql: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach? | 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 employee.emp_fname , class.class_room from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Accounting'

### Instruction:

Convert text to sql: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems 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 distinct employee.emp_fname , professor.prof_high_degree from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Computer Info. Systems'
### Instruction:

Convert text to sql: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems 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 distinct employee.emp_fname , professor.prof_high_degree from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Computer Info. Systems'

### Instruction:

Convert text to sql: What is the last name of the student who got a grade A in the class with code 10018. | 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 student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'A' and enroll.class_code = 10018
### Instruction:

Convert text to sql: What is the last name of the student who received an A in the class with the code 10018? | 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 student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'A' and enroll.class_code = 10018

### Instruction:

Convert text to sql: Find the first name and office of history professor who did not get a Ph.D. degree. | 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 employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' and professor.prof_high_degree != 'Ph.D.'
### Instruction:

Convert text to sql: What are the first names and offices of history professors who don't have Ph.D.s? | 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 employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' and professor.prof_high_degree != 'Ph.D.'

### Instruction:

Convert text to sql: Find the first names of professors who are teaching more than one class. | 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 employee.emp_fname from class join employee on class.prof_num = employee.emp_num group by class.prof_num having count ( * ) > 1
### Instruction:

Convert text to sql: What are the first names of all professors who teach more than one class? | 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 employee.emp_fname from class join employee on class.prof_num = employee.emp_num group by class.prof_num having count ( * ) > 1

### Instruction:

Convert text to sql: Find the first names of students who took exactly one class. | 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 student.stu_fname from student join enroll on student.stu_num = enroll.stu_num group by enroll.stu_num having count ( * ) = 1
### Instruction:

Convert text to sql: What are the first names of student who only took one course? | 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 student.stu_fname from student join enroll on student.stu_num = enroll.stu_num group by enroll.stu_num having count ( * ) = 1

### Instruction:

Convert text to sql: Find the name of department that offers the class whose description has the word "Statistics". | 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 department.dept_name from course join department on course.dept_code = department.dept_code where course.crs_description like '%Statistics%'
### Instruction:

Convert text to sql: What is the name of the department that offers a course that has a description including the word "Statistics"? | 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 department.dept_name from course join department on course.dept_code = department.dept_code where course.crs_description like '%Statistics%'

### Instruction:

Convert text to sql: What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? | 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 student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211' and student.stu_lname like 'S%'
### Instruction:

Convert text to sql: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211? | 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 student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211' and student.stu_lname like 'S%'
### Instruction:

Convert text to sql: How many clubs are there? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select count ( * ) from club

### Instruction:

Convert text to sql: What is the total number of clubs? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select count ( * ) from club

### Instruction:

Convert text to sql: List the distinct region of clubs in ascending alphabetical order. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select distinct region from club order by region asc

### Instruction:

Convert text to sql: What are the different regions of clubs in ascending alphabetical order? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select distinct region from club order by region asc