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

Convert text to sql: For each product which has problems, what are the number of problems and the product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id
### Instruction:

Convert text to sql: For each product with some problems, list the count of problems and the product id. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id
### Instruction:

Convert text to sql: For each product that has problems, find the number of problems reported after 1986-11-13 and the product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id where problems.date_problem_reported > '1986-11-13' group by product.product_id
### Instruction:

Convert text to sql: What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id where problems.date_problem_reported > '1986-11-13' group by product.product_id
### Instruction:

Convert text to sql: List the names of all the distinct product names in alphabetical order? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select distinct _ from _ order by _ asc | select distinct product_name from product order by product_name asc
### Instruction:

Convert text to sql: Sort all the distinct product names in alphabetical order. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select distinct _ from _ order by _ asc | select distinct product_name from product order by product_name asc
### Instruction:

Convert text to sql: List all the distinct product names ordered by product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select distinct _ from _ order by _ asc | select distinct product_name from product order by product_id asc
### Instruction:

Convert text to sql: What is the list of distinct product names sorted by product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select distinct _ from _ order by _ asc | select distinct product_name from product order by product_id asc
### Instruction:

Convert text to sql: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ union select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Dameon' and staff.staff_last_name = 'Frami' union select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Jolie' and staff.staff_last_name = 'Weber'
### Instruction:

Convert text to sql: Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ union select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Dameon' and staff.staff_last_name = 'Frami' union select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Jolie' and staff.staff_last_name = 'Weber'
### Instruction:

Convert text to sql: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' and staff.staff_last_name = 'Berge' intersect select product_id from problems join staff on problems.closure_authorised_by_staff_id = staff.staff_id where staff.staff_first_name = 'Ashley' and staff.staff_last_name = 'Medhurst'
### Instruction:

Convert text to sql: For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' and staff.staff_last_name = 'Berge' intersect select product_id from problems join staff on problems.closure_authorised_by_staff_id = staff.staff_id where staff.staff_first_name = 'Ashley' and staff.staff_last_name = 'Medhurst'
### Instruction:

Convert text to sql: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ < ( select min ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported < ( select min ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lysanne' and staff.staff_last_name = 'Turcotte' )
### Instruction:

Convert text to sql: Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ < ( select min ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported < ( select min ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lysanne' and staff.staff_last_name = 'Turcotte' )
### Instruction:

Convert text to sql: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ > ( select max ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported > ( select max ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' )
### Instruction:

Convert text to sql: Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | 

### Response:

select _ from _ where _ > ( select max ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported > ( select max ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' )