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

Convert text to sql: Find the full names of faculties who are members of department with department number 520. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520

### Instruction:

Convert text to sql: What are the full names of faculty members who are a part of department 520? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520

### Instruction:

Convert text to sql: What are the first names and last names of the students that minor in the department with DNO 140. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140
### Instruction:

Convert text to sql: What are the full names of students minoring in department 140? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140

### Instruction:

Convert text to sql: Find the last names of faculties who are members of computer science department. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science'

### Instruction:

Convert text to sql: What are the last names of faculty who are part of the computer science department? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science'
### Instruction:

Convert text to sql: Find the average grade point of student whose last name is Smith. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select avg ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.lname = 'Smith'

### Instruction:

Convert text to sql: What is the average gradepoint for students with the last name Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select avg ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.lname = 'Smith'
### Instruction:

Convert text to sql: What is the maximum and minimum grade point of students who live in NYC? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select max ( gradeconversion.gradepoint ) , min ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.city_code = 'NYC'

### Instruction:

Convert text to sql: Give the maximum and minimum gradepoints for students living in NYC? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select max ( gradeconversion.gradepoint ) , min ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.city_code = 'NYC'
### Instruction:

Convert text to sql: Find the names of courses that have either 3 credits or 1 credit but 4 hours. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4

### Instruction:

Convert text to sql: What are the names of courses that give either 3 credits, or 1 credit and 4 hours? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4

### Instruction:

Convert text to sql: Find the names of departments that are either in division AS or in division EN and in Building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select dname from department where division = 'AS' union select dname from department where division = 'EN' and building = 'NEB'
### Instruction:

Convert text to sql: What are the names of departments either in division AS, or in division EN and in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select dname from department where division = 'AS' union select dname from department where division = 'EN' and building = 'NEB'

### Instruction:

Convert text to sql: Find the first name of students not enrolled in any course. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select fname from student where stuid not in ( select stuid from enrolled_in )

### Instruction:

Convert text to sql: What are the first names of all students that are not enrolled in courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | 

### Response:

select fname from student where stuid not in ( select stuid from enrolled_in )
### Instruction:

Convert text to sql: What are the ids of the top three products that were purchased in the largest amount? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | 

### Response:

select product_id from product_suppliers order by total_amount_purchased desc limit 3
### Instruction:

Convert text to sql: Give the ids of the three products purchased in the largest amounts. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | 

### Response:

select product_id from product_suppliers order by total_amount_purchased desc limit 3
### Instruction:

Convert text to sql: What are the product id and product type of the cheapest product? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | 

### Response:

select product_id , product_type_code from products order by product_price asc limit 1