db_id
stringlengths
4
31
text
stringlengths
370
4.84k
tracking_orders
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 id of the customer who made the most orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1
tracking_orders
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 id and status of orders which belong to the customer named "Jeramie". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
tracking_orders
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 orders are made by the customer named "Jeramie"? Give me the order ids and status. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
tracking_orders
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 dates of orders which belong to the customer named "Jeramie". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
tracking_orders
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 dates of the orders made by the customer named "Jeramie"? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.date_order_placed >= '2009-01-01' and orders.date_order_placed <= '2010-01-01'
tracking_orders
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 customers made orders between 2009-01-01 and 2010-01-01? Find their names. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.date_order_placed >= '2009-01-01' and orders.date_order_placed <= '2010-01-01'
tracking_orders
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 distinct product ids from orders placed between 1975-01-01 and 1976-01-01? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct order_items.product_id from orders join order_items on orders.order_id = order_items.order_id where orders.date_order_placed >= '1975-01-01' and orders.date_order_placed <= '1976-01-01'
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01?? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct order_items.product_id from orders join order_items on orders.order_id = order_items.order_id where orders.date_order_placed >= '1975-01-01' and orders.date_order_placed <= '1976-01-01'
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the customers who have order status both "On Road" and "Shipped". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'
tracking_orders
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 customers have both "On Road" and "Shipped" as order status? List the customer names. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'
tracking_orders
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 id of the customers who have order status both "On Road" and "Shipped". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'
tracking_orders
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 customers have both "On Road" and "Shipped" as order status? List the customer ids. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'
tracking_orders
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: When was the order placed whose shipment tracking number is 3452? Give me the date. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452
tracking_orders
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: On which day was the order placed whose shipment tracking number is 3452? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452
tracking_orders
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 placement date of the order whose invoice number is 10? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10
tracking_orders
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: On what day was the order with invoice number 10 placed? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10
tracking_orders
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 count and id of each product in all the orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select count ( * ) , products.product_id from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id
tracking_orders
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, return its id and the number of times it was ordered. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select count ( * ) , products.product_id from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id
tracking_orders
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 name and count of each product in all orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select products.product_name , count ( * ) from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id
tracking_orders
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, show its name and the number of times it was ordered. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select products.product_name , count ( * ) from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id
tracking_orders
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 orders which are shipped after 2000-01-01. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select order_id from shipments where shipment_date > '2000-01-01'
tracking_orders
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 orders have shipment after 2000-01-01? Give me the order ids. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select order_id from shipments where shipment_date > '2000-01-01'
tracking_orders
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 id of the order which is shipped most recently. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select order_id from shipments where shipment_date = ( select max ( shipment_date ) from shipments )
tracking_orders
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 order has the most recent shipment? Give me the order id. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select order_id from shipments where shipment_date = ( select max ( shipment_date ) from shipments )
tracking_orders
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 distinct products in alphabetical order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct product_name from products order by product_name asc
tracking_orders
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 products in alphabetical order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct product_name from products order by product_name asc
tracking_orders
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 all distinct orders ordered by placed date. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct order_id from orders order by date_order_placed asc
tracking_orders
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 ids of the all distinct orders, sorted by placement date? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct order_id from orders order by date_order_placed asc
tracking_orders
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 order which has the most items? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.order_id from orders join order_items on orders.order_id = order_items.order_id group by orders.order_id order by count ( * ) desc limit 1
tracking_orders
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 order deals with the most items? Return the order id. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select orders.order_id from orders join order_items on orders.order_id = order_items.order_id group by orders.order_id order by count ( * ) desc limit 1
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the customer who has the largest number of orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1
tracking_orders
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 the customer who made the most orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1
tracking_orders
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 invoice numbers which are created before 1989-09-03 or after 2007-12-25. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select invoice_number from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'
tracking_orders
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 invoice numbers created before 1989-09-03 or after 2007-12-25? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select invoice_number from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'
tracking_orders
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 distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct invoice_details from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select distinct invoice_details from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'
tracking_orders
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 customer who has at least two orders, find the customer name and number of orders made. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name , count ( * ) from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) >= 2
tracking_orders
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 customers have made at least two orders? Give me each customer name and number of orders made. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name , count ( * ) from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) >= 2
tracking_orders
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 the customers who have at most two orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) <= 2
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the customers who have made two or less orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) <= 2
tracking_orders
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 the customers who have once bought product "food". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1
tracking_orders
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the customers who bought product "food" at least once? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1
tracking_orders
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 customers who have once canceled the purchase of the product "food" (the item status is "Cancel"). | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where order_items.order_item_status = 'Cancel' and products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1
tracking_orders
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 customers have ever canceled the purchase of the product "food" (the item status is "Cancel")? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | ### Response: select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where order_items.order_item_status = 'Cancel' and products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1
architecture
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 architects are female? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select count ( * ) from architect where gender = 'female'
architecture
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 name, nationality and id of all male architects ordered by their names lexicographically. | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select name , nationality , id from architect where gender = 'male' order by name asc
architecture
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 maximum length in meters for the bridges and what are the architects' names? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select max ( bridge.length_meters ) , architect.name from bridge join architect on bridge.architect_id = architect.id
architecture
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 length in feet of the bridges? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select avg ( length_feet ) from bridge
architecture
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 year of construction for the mills of 'Grondzeiler' type? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select name , built_year from mill where type = 'Grondzeiler'
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct names and nationalities of the architects who have ever built a mill? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select distinct architect.name , architect.nationality from architect join mill on architect.id = mill.architect_id
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the mills which are not located in 'Donceel'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select name from mill where location != 'Donceel'
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct types of mills that are built by American or Canadian architects? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select distinct mill.type from mill join architect on mill.architect_id = architect.id where architect.nationality = 'American' or architect.nationality = 'Canadian'
architecture
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 and names of the architects who built at least 3 bridges ? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select architect.id , architect.name from architect join bridge on architect.id = bridge.architect_id group by architect.id having count ( * ) >= 3
architecture
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, name and nationality of the architect who built most mills? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select architect.id , architect.name , architect.nationality from architect join mill on architect.id = mill.architect_id group by architect.id order by count ( * ) desc limit 1
architecture
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, names and genders of the architects who built two bridges or one mill? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select architect.id , architect.name , architect.gender from architect join bridge on architect.id = mill.architect_id group by architect.id having count ( * ) = 2 union select architect.id , architect.name , architect.gender from architect join mill on architect.id = mill.architect_id group by architect.id having count ( * ) = 1
architecture
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 location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select location from bridge where name = 'Kolob Arch' or name = 'Rainbow Bridge'
architecture
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 of the mill names contains the french word 'Moulin'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select name from mill where name like '%Moulin%'
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select distinct mill.name from mill join architect on mill.architect_id = architect.id join bridge on bridge.architect_id = architect.id where bridge.length_meters > 80
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the most common mill type, and how many are there? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select type , count ( * ) from mill group by type order by count ( * ) desc limit 1
architecture
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 architects haven't built a mill before year 1850? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select count ( * ) from architect where id not in ( select architect_id from mill where built_year < 1850 )
architecture
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length. | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | ### Response: select bridge.name from bridge join architect on bridge.architect_id = architect.id where architect.nationality = 'American' order by bridge.length_feet asc
culture_company
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 book clubs are there? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select count ( * ) from book_club
culture_company
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: Count the number of book clubs. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select count ( * ) from book_club
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: show the titles, and authors or editors for all books made after the year 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select book_title , author_or_editor from book_club where year > 1989
culture_company
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 titles and authors or editors that correspond to books made after 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select book_title , author_or_editor from book_club where year > 1989
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all distinct publishers for books. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select distinct publisher from book_club
culture_company
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 all the different book publishers? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select distinct publisher from book_club
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the years, book titles, and publishers for all books, in descending order by year. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select year , book_title , publisher from book_club order by year desc
culture_company
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 years, titles, and publishers for all books, ordered by year descending? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select year , book_title , publisher from book_club order by year desc
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all publishers and the number of books for each publisher. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher , count ( * ) from book_club group by publisher
culture_company
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 books are there for each publisher? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher , count ( * ) from book_club group by publisher
culture_company
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 publisher with most number of books? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club group by publisher order by count ( * ) desc limit 1
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the publisher that has published the most books. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club group by publisher order by count ( * ) desc limit 1
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all book categories and the number of books in each category. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select category , count ( * ) from book_club group by category
culture_company
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 books fall into each category? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select category , count ( * ) from book_club group by category
culture_company
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 categories that have at least two books after year 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select category from book_club where year > 1989 group by category having count ( * ) >= 2
culture_company
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 categories have two or more corresponding books that were made after 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select category from book_club where year > 1989 group by category having count ( * ) >= 2
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show publishers with a book published in 1989 and a book in 1990. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990
culture_company
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 publishers who have published a book in both 1989 and 1990? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all publishers which do not have a book in 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club except select publisher from book_club where year = 1989
culture_company
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 publishers did not publish a book in 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select publisher from book_club except select publisher from book_club where year = 1989
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all movie titles, years, and directors, ordered by budget. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select title , year , director from movie order by budget_million asc
culture_company
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 titles, years, and directors of all movies, ordered by budget in millions? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select title , year , director from movie order by budget_million asc
culture_company
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 movie directors are there? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select count ( distinct director ) from movie
culture_company
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: Count the number of different directors. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select count ( distinct director ) from movie
culture_company
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 title and director for the movie with highest worldwide gross in the year 2000 or before? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select title , director from movie where year <= 2000 order by gross_worldwide desc limit 1
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select title , director from movie where year <= 2000 order by gross_worldwide desc limit 1
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all director names who have a movie in both year 1999 and 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select director from movie where year = 2000 intersect select director from movie where year = 1999
culture_company
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 directors had a movie both in the year 1999 and 2000? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select director from movie where year = 2000 intersect select director from movie where year = 1999
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all director names who have a movie in the year 1999 or 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select director from movie where year = 1999 or year = 2000
culture_company
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 directors had a movie in either 1999 or 2000? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select director from movie where year = 1999 or year = 2000
culture_company
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, maximum, and minimum budget for all movies before 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select avg ( budget_million ) , max ( budget_million ) , min ( budget_million ) from movie where year < 2000
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the average, maximum, and minimum budgets in millions for movies made before the year 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select avg ( budget_million ) , max ( budget_million ) , min ( budget_million ) from movie where year < 2000
culture_company
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 company names with a book published by Alyson. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select culture_company.company_name from culture_company join book_club on culture_company.book_club_id = book_club.book_club_id where book_club.publisher = 'Alyson'
culture_company
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 all the company names that have a book published by Alyson? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select culture_company.company_name from culture_company join book_club on culture_company.book_club_id = book_club.book_club_id where book_club.publisher = 'Alyson'
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the movie titles and book titles for all companies in China. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select movie.title , book_club.book_title from movie join culture_company on movie.movie_id = culture_company.movie_id join book_club on book_club.book_club_id = culture_company.book_club_id where culture_company.incorporated_in = 'China'
culture_company
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 titles of movies and books corresponding to companies incorporated in China? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select movie.title , book_club.book_title from movie join culture_company on movie.movie_id = culture_company.movie_id join book_club on book_club.book_club_id = culture_company.book_club_id where culture_company.incorporated_in = 'China'
culture_company
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all company names with a movie directed in year 1999. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select culture_company.company_name from movie join culture_company on movie.movie_id = culture_company.movie_id where movie.year = 1999
culture_company
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 all company names that have a corresponding movie directed in the year 1999? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | ### Response: select culture_company.company_name from movie join culture_company on movie.movie_id = culture_company.movie_id where movie.year = 1999