db_id
stringlengths
4
31
text
stringlengths
370
4.84k
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the department with the student that has the lowest GPA? | 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 student join department on student.dept_code = department.dept_code order by stu_gpa asc limit 1
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. | 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 stu_fname , stu_gpa from student where stu_gpa < ( select avg ( stu_gpa ) from student )
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the first name and GPA of every student that has a GPA lower than average? | 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 stu_fname , stu_gpa from student where stu_gpa < ( select avg ( stu_gpa ) from student )
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and address of the department that has the highest number of students. | 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 , department.dept_address from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 1
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name and address of the department with the most students? | 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 , department.dept_address from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 1
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name, address, number of students in the departments that have the top 3 highest number of students. | 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 , department.dept_address , count ( * ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 3
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name, address, and number of students in the departments that have the 3 most students? | 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 , department.dept_address , count ( * ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 3
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first name and office of the professor who is in the history department and has 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 employee join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'History' and professor.prof_high_degree = 'Ph.D.'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names and office of the professors who are in the history department and have a Ph.D? | 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 employee join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'History' and professor.prof_high_degree = 'Ph.D.'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first names of all instructors who have taught some course and the course code. | 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.crs_code from class join employee on class.prof_num = employee.emp_num
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names of all teachers who have taught a course and the corresponding course codes? | 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.crs_code from class join employee on class.prof_num = employee.emp_num
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first names of all instructors who have taught some course and the course description. | 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 , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names of all teachers who have taught a course and the corresponding descriptions? | 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 , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first names and offices of all instructors who have taught some course and also find the course description. | 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 , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names, office locations of all lecturers who have taught some 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 employee.emp_fname , professor.prof_office , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first names and offices of all instructors who have taught some course and the course description and the department name. | 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 , course.crs_description , department.dept_name from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names, office locations, and departments of all instructors, and also what are the descriptions 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 , professor.prof_office , course.crs_description , department.dept_name from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find names of all students who took some course and the course description. | 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 , student.stu_lname , course.crs_description from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all students who took a class and the corresponding course descriptions? | 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 , student.stu_lname , course.crs_description from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find names of all students who took some course and got A or C. | 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 , student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'C' or enroll.enroll_grade = 'A'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all students taking a course who received an A or C? | 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 , student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'C' or enroll.enroll_grade = 'A'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the first names of all professors in the Accounting department who is teaching some course and the class room. | 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'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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.'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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.'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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%'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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%'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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%'
college_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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%'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of gold medals for 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 avg ( gold ) from club_rank
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of gold medals for a club? | 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 avg ( gold ) from club_rank
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the types and countries of competitions? | 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 competition_type , country from competition
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the types of every competition and in which countries are they located? | 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 competition_type , country from competition
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct years in which the competitions type is not "Tournament"? | 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 year from competition where competition_type != 'Tournament'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different years for all competitions that are not of type equal to tournament? | 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 year from competition where competition_type != 'Tournament'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum number of silver medals for 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 max ( silver ) , min ( silver ) from club_rank
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum number of silver medals for all the 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 max ( silver ) , min ( silver ) from club_rank
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many clubs have total medals less than 10? | 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_rank where total < 10
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total number of clubs that have less than 10 medals in total? | 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_rank where total < 10
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all club names in ascending order of start year. | 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 name from club order by start_year asc
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all the clubs starting with the oldest? | 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 name from club order by start_year asc
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all club names in descending 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 name from club order by name desc
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all the clubs ordered in descending 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 name from club order by name desc
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the names and the players 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 club.name , player.player_id from club join player on club.club_id = player.club_id
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and players of all the 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 club.name , player.player_id from club join player on club.club_id = player.club_id
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of clubs that have players with position "Right Wing". | 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 club.name from club join player on club.club_id = player.club_id where player.position = 'Right Wing'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the clubs that have players in the position of "Right Wing"? | 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 club.name from club join player on club.club_id = player.club_id where player.position = 'Right Wing'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average points of players from club with name "AIB". | 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 avg ( player.points ) from club join player on club.club_id = player.club_id where club.name = 'AIB'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of points for players from the "AIB" club? | 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 avg ( player.points ) from club join player on club.club_id = player.club_id where club.name = 'AIB'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the position of players and the average number of points of players of each position. | 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 position , avg ( points ) from player group by position
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each position, what is the average number of points for players in that position? | 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 position , avg ( points ) from player group by position
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the position of players with average number of points scored by players of that position bigger than 20. | 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 position from player group by name having avg ( points ) >= 20
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the positions of players whose average number of points scored by that position is larger than 20? | 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 position from player group by name having avg ( points ) >= 20
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the types of competition and the number of competitions of each type. | 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 competition_type , count ( * ) from competition group by competition_type
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the types of competition and number of competitions for that type? | 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 competition_type , count ( * ) from competition group by competition_type
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the most common type of competition. | 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 competition_type from competition group by competition_type order by count ( * ) desc limit 1
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the most common competition type? | 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 competition_type from competition group by competition_type order by count ( * ) desc limit 1
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the types of competition that have at most five competitions of that type. | 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 competition_type from competition group by competition_type having count ( * ) <= 5
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the types of competition that have most 5 competitions for that type? | 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 competition_type from competition group by competition_type having count ( * ) <= 5
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of clubs that do not have any players. | 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 name from club where club_id not in ( select club_id from player )
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all clubs that do not have any players? | 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 name from club where club_id not in ( select club_id from player )
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the positions with both players having more than 20 points and less than 10 points. | 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 position from player where points > 20 intersect select position from player where points < 10
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the positions of both players that have more than 20 20 points and less than 10 points? | 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 position from player where points > 20 intersect select position from player where points < 10
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show total points of all players. | 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 sum ( points ) from player
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total number of points for all players? | 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 sum ( points ) from player
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: how many different positions 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 ( distinct position ) from player
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different position for players are listed? | 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 ( distinct position ) from player
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what are the name of players who get more than the average points. | 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 name from player where points > ( select avg ( points ) from player )
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all players that got more than the average number of points? | 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 name from player where points > ( select avg ( points ) from player )
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the number of players whose points are lower than 30 in each position. | 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 ( * ) , position from player where points < 30 group by position
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the number of players who have points less than 30 for each position? | 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 ( * ) , position from player where points < 30 group by position
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: which country did participated in the most number of Tournament competitions? | 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 country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the name of the country that participated in the most tournament competitions? | 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 country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: which countries did participated in both Friendly and Tournament type competitions. | 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 country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the countries that participated in both friendly and tournament type competitions? | 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 country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the countries that have never participated in any competition with Friendly type. | 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 country from competition except select country from competition where competition_type = 'Friendly'
sports_competition
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the countries that have never participated in any friendly-type competitions? | 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 country from competition except select country from competition where competition_type = 'Friendly'
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many furniture components are there in total? | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select sum ( num_of_component ) from furniture
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the name and id of the furniture with the highest market rate. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select name , furniture_id from furniture order by market_rate desc limit 1
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the total market rate of the furnitures that have the top 2 market shares. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select sum ( market_rate ) from furniture order by market_rate desc limit 2
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the component amounts and names of all furnitures that have more than 10 components. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select num_of_component , name from furniture where num_of_component > 10
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and component amount of the least popular furniture. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select name , num_of_component from furniture order by market_rate asc limit 1
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of furnitures whose prices are lower than the highest price. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select furniture.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id where furniture_manufacte.price_in_dollar < ( select max ( price_in_dollar ) from furniture_manufacte )
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which manufacturer has the most number of shops? List its name and year of opening. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select open_year , name from manufacturer order by num_of_shops desc limit 1
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average number of factories for the manufacturers that have more than 20 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select avg ( num_of_factories ) from manufacturer where num_of_shops > 20
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all manufacturer names and ids ordered by their opening year. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select name , manufacturer_id from manufacturer order by open_year asc
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select name , open_year from manufacturer where num_of_shops > 10 or num_of_factories < 10
manufacturer
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | ### Response: select max ( num_of_shops ) , avg ( num_of_factories ) from manufacturer where open_year < 1990