db_id
stringlengths 4
31
| text
stringlengths 370
4.84k
|
---|---|
manufactory_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 companies whose revenue is greater than the average revenue of all companies. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers ) |
manufactory_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 manufacturers with revenue greater than the average of all revenues? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers ) |
manufactory_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 companies whose revenue is smaller than the revenue of all companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' ) |
manufactory_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 companies with revenue less than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' ) |
manufactory_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 total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' ) |
manufactory_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 total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' ) |
manufactory_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 total revenue of companies of each founder. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) , founder from manufacturers group by founder |
manufactory_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 total revenue of companies started by founder? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) , founder from manufacturers group by founder |
manufactory_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 revenue of the company that earns the highest revenue in each city. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , max ( revenue ) , headquarter from manufacturers group by headquarter |
manufactory_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 and revenues of the companies with the highest revenues in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , max ( revenue ) , headquarter from manufacturers group by headquarter |
manufactory_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 total revenue for each manufacturer. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) , name from manufacturers group by name |
manufactory_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 total revenue of each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select sum ( revenue ) , name from manufacturers group by name |
manufactory_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 average prices of all products from each manufacture, and list each company's name. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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 average prices of products for each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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 number of different products that are produced by companies at different headquarter cities. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter |
manufactory_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: How many different products are produced in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter |
manufactory_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 number of products which Sony does not make. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' ) |
manufactory_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: How many products are not made by Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' ) |
manufactory_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 companies that do not make DVD drive. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers except select manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code where products.name = 'DVD drive' |
manufactory_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 companies that do not make DVD drives? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from manufacturers except select manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code where products.name = 'DVD drive' |
manufactory_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 number of products for each manufacturer, showing the name of each company. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( * ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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: How many products are there for each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( * ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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: Select the names of all the products in the store. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from products |
manufactory_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 products? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from products |
manufactory_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: Select the names and the prices of all the products in the store. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products |
manufactory_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 and prices of all products in the store? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products |
manufactory_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: Select the name of the products with a price less than or equal to $200. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from products where price <= 200 |
manufactory_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 products with price at most 200? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name from products where price <= 200 |
manufactory_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 all information of all the products with a price between $60 and $120. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select * from products where price between 60 and 120 |
manufactory_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 all the information of all the products that have a price between 60 and 120? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select * from products where price between 60 and 120 |
manufactory_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: Compute the average price of all the products. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) from products |
manufactory_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 average price across all products? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) from products |
manufactory_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: Compute the average price of all products with manufacturer code equal to 2. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) from products where manufacturer = 2 |
manufactory_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 average price of products with manufacturer codes equal to 2? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) from products where manufacturer = 2 |
manufactory_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: Compute the number of products with a price larger than or equal to $180. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( * ) from products where price >= 180 |
manufactory_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: How many products have prices of at least 180? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select count ( * ) from products where price >= 180 |
manufactory_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: Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order). | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products where price >= 180 order by price desc , name asc |
manufactory_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 and prices of products that cost at least 180, sorted by price decreasing and name ascending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products where price >= 180 order by price desc , name asc |
manufactory_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: Select all the data from the products and each product's manufacturer. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select * from products join manufacturers on products.manufacturer = manufacturers.code |
manufactory_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 all the product data, as well as each product's manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select * from products join manufacturers on products.manufacturer = manufacturers.code |
manufactory_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: Select the average price of each manufacturer's products, showing only the manufacturer's code. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) , manufacturer from products group by manufacturer |
manufactory_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 average prices of products, grouped by manufacturer code? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( price ) , manufacturer from products group by manufacturer |
manufactory_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: Select the average price of each manufacturer's products, showing the manufacturer's name. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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 average prices of products, grouped by manufacturer name? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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: Select the names of manufacturer whose products have an average price higher than or equal to $150. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name having avg ( products.price ) >= 150 |
manufactory_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 and average prices of products for manufacturers whose products cost on average 150 or more? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name having avg ( products.price ) >= 150 |
manufactory_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: Select the name and price of the cheapest product. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products order by price asc limit 1 |
manufactory_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 price of the cheapest product? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select name , price from products order by price asc limit 1 |
manufactory_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: Select the name of each manufacturer along with the name and price of its most expensive product. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select products.name , max ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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: For each manufacturer name, what are the names and prices of their most expensive product? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select products.name , max ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name |
manufactory_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: Select the code of the product that is cheapest in each product category. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select code , name , min ( price ) from products group by name |
manufactory_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 codes and names of the cheapest products in each category? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code |
### Response:
select code , name , min ( price ) from products group by name |
tracking_software_problems | 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 id of the problem log that is created most recently? | 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 problem_log_id from problem_log order by log_entry_date desc limit 1 |
tracking_software_problems | 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 problem log was created most recently? Give me the log 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 problem_log_id from problem_log order by log_entry_date desc limit 1 |
tracking_software_problems | 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 oldest log id and its corresponding problem 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 problem_log_id , problem_id from problem_log order by log_entry_date asc limit 1 |
tracking_software_problems | 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 oldest log id and its corresponding problem 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 problem_log_id , problem_id from problem_log order by log_entry_date asc limit 1 |
tracking_software_problems | 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 all the ids and dates of the logs for the problem whose id is 10. | 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 problem_log_id , log_entry_date from problem_log where problem_id = 10 |
tracking_software_problems | 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 the problem with id 10, return the ids and dates of its problem logs. | 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 problem_log_id , log_entry_date from problem_log where problem_id = 10 |
tracking_software_problems | 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 the log ids and their descriptions from the problem logs. | 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 problem_log_id , log_entry_description from problem_log |
tracking_software_problems | 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 log id and entry description of each problem? | 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 problem_log_id , log_entry_description from problem_log |
tracking_software_problems | 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 first and last names of all distinct staff members who are assigned to the problem whose id is 1. | 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 staff_first_name , staff_last_name from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where problem_log.problem_id = 1 |
tracking_software_problems | 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 staff members are assigned to the problem with id 1? 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 distinct staff_first_name , staff_last_name from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where problem_log.problem_id = 1 |
tracking_software_problems | 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 problem id and log id which are assigned to the staff named 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 distinct problem_log.problem_id , problem_log.problem_log_id from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' |
tracking_software_problems | 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 problem id and log id are assigned to the staff named 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 distinct problem_log.problem_id , problem_log.problem_log_id from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' |
tracking_software_problems | 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 problems are there for product voluptatem? | 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 product join problems on product.product_id = problems.product_id where product.product_name = 'voluptatem' |
tracking_software_problems | 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 problems did the product called "voluptatem" have in record? | 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 product join problems on product.product_id = problems.product_id where product.product_name = 'voluptatem' |
tracking_software_problems | 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 problems does the product with the most problems have? List the number of the problems and product name. | 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 ( * ) , product.product_name from product join problems on product.product_id = problems.product_id group by product.product_name order by count ( * ) desc limit 1 |
tracking_software_problems | 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 product has the most problems? Give me the number of problems and the product name. | 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 ( * ) , product.product_name from product join problems on product.product_id = problems.product_id group by product.product_name order by count ( * ) desc limit 1 |
tracking_software_problems | 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 a list of descriptions of the problems that are reported by the staff whose first name is Christop. | 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 problems.problem_description from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' |
tracking_software_problems | 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 problems are reported by the staff with first name "Christop"? Show the descriptions 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 problems.problem_description from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' |
tracking_software_problems | 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 ids of the problems that are reported by the staff whose last name is Bosco. | 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 problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_last_name = 'Bosco' |
tracking_software_problems | 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 problems are reported by the staff with last name "Bosco"? Show 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 problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_last_name = 'Bosco' |
tracking_software_problems | 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 ids of the problems which are reported after 1978-06-26? | 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 problem_id from problems where date_problem_reported > '1978-06-26' |
tracking_software_problems | 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 ids of the problems reported after 1978-06-26. | 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 problem_id from problems where date_problem_reported > '1978-06-26' |
tracking_software_problems | 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 ids of the problems which are reported before 1978-06-26? | 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 problem_id from problems where date_problem_reported < '1978-06-26' |
tracking_software_problems | 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 problems are reported before 1978-06-26? 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 problem_id from problems where date_problem_reported < '1978-06-26' |
tracking_software_problems | 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 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 ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id |
tracking_software_problems | 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 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 ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id |
tracking_software_problems | 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 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 ( * ) , 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 |
tracking_software_problems | 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 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 ( * ) , 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 |
tracking_software_problems | 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 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 product_name from product order by product_name asc |
tracking_software_problems | 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: 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 product_name from product order by product_name asc |
tracking_software_problems | 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 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 product_name from product order by product_id asc |
tracking_software_problems | 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 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 product_name from product order by product_id asc |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' ) |
tracking_software_problems | 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 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 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' ) |
tracking_software_problems | 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 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 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' ) |
tracking_software_problems | 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 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 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' ) |
tracking_software_problems | 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 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 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 |
tracking_software_problems | 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 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 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 |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
tracking_software_problems | 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 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 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' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.