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

Convert text to sql: Find the top 3 products which have the largest number of 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 _ group by _ order by count ( _ ) desc limit _ | select product.product_name from problems join product on problems.product_id = product.product_id group by product.product_name order by count ( * ) desc limit 3
### Instruction:

Convert text to sql: What are the three products that have the most problems?s | 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 _ group by _ order by count ( _ ) desc limit _ | select product.product_name from problems join product on problems.product_id = product.product_id group by product.product_name order by count ( * ) desc limit 3
### Instruction:

Convert text to sql: List the ids of the problems from the product "voluptatem" that are reported after 1995? | 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 problems.problem_id from problems join product on problems.product_id = product.product_id where product.product_name = 'voluptatem' and problems.date_problem_reported > '1995'
### Instruction:

Convert text to sql: What are the ids of the problems that are from the product "voluptatem" and are reported after 1995? | 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 problems.problem_id from problems join product on problems.product_id = product.product_id where product.product_name = 'voluptatem' and problems.date_problem_reported > '1995'
### Instruction:

Convert text to sql: Find the first and last name of the staff members who reported problems from the product "rem" but not "aut"? | 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 _ except select _ from _ where _ | select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'rem' except select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'aut'
### Instruction:

Convert text to sql: Which staff members who reported problems from the product "rem" but not "aut"? Give me their first and last names. | 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 _ except select _ from _ where _ | select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'rem' except select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'aut'
### Instruction:

Convert text to sql: Find the products which have problems reported by both Lacey Bosco and Kenton Champlin? | 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.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lacey' and staff.staff_last_name = 'Bosco' intersect select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Kenton' and staff.staff_last_name = 'Champlin'
### Instruction:

Convert text to sql: Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin? | 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.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lacey' and staff.staff_last_name = 'Bosco' intersect select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Kenton' and staff.staff_last_name = 'Champlin'
### Instruction:

Convert text to sql: How many branches where have more than average number of memberships are there? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from branch where membership_amount > ( select avg ( membership_amount ) from branch )
### Instruction:

Convert text to sql: What is the number of branches that have more than the average number of memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from branch where membership_amount > ( select avg ( membership_amount ) from branch )
### Instruction:

Convert text to sql: Show name, address road, and city for all branches sorted by open year. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select name , address_road , city from branch order by open_year asc
### Instruction:

Convert text to sql: What are the names, address roads, and cities of the branches ordered by opening year? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select name , address_road , city from branch order by open_year asc
### Instruction:

Convert text to sql: What are names for top three branches with most number of membership? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from branch order by membership_amount desc limit 3
### Instruction:

Convert text to sql: What are the names for the 3 branches that have the most memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from branch order by membership_amount desc limit 3
### Instruction:

Convert text to sql: Show all distinct city where branches with at least 100 memberships are located. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select distinct _ from _ where _ | select distinct city from branch where membership_amount >= 100
### Instruction:

Convert text to sql: What are the different cities that have more than 100 memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select distinct _ from _ where _ | select distinct city from branch where membership_amount >= 100
### Instruction:

Convert text to sql: List all open years when at least two shops are opened. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select open_year from branch group by open_year having count ( * ) >= 2
### Instruction:

Convert text to sql: What are the opening years in which at least two shops opened? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select open_year from branch group by open_year having count ( * ) >= 2
### Instruction:

Convert text to sql: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select min ( _ ) , max ( _ ) from _ where _ | select min ( membership_amount ) , max ( membership_amount ) from branch where open_year = 2011 or city = 'London'
### Instruction:

Convert text to sql: What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select min ( _ ) , max ( _ ) from _ where _ | select min ( membership_amount ) , max ( membership_amount ) from branch where open_year = 2011 or city = 'London'
### Instruction:

Convert text to sql: Show the city and the number of branches opened before 2010 for each city. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select city , count ( * ) from branch where open_year < 2010 group by city
### Instruction:

Convert text to sql: For each city, how many branches opened before 2010? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select city , count ( * ) from branch where open_year < 2010 group by city
### Instruction:

Convert text to sql: How many different levels do members have? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct level ) from member
### Instruction:

Convert text to sql: What are the different membership levels? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct level ) from member