richardr1126/spider-skeleton-context-instruct huggingface dataset:
### 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 _ from _ group by _ order by count ( _ ) desc limit _ | 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
### 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 _ from _ where _ | select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
### 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 _ from _ where _ | select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
### 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 _ from _ where _ | select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
### 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 _ from _ where _ | select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'
### 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 _ from _ where _ | 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'
### 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 _ from _ where _ | 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'
### 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 _ from _ where _ | 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'
### 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 _ from _ where _ | 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'
### 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 _ from _ where _ intersect select _ from _ where _ | 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'
### 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 _ from _ where _ intersect select _ from _ where _ | 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'
### 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 _ from _ where _ intersect select _ from _ where _ | 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'
### 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 _ from _ where _ intersect select _ from _ where _ | 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'
### 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 _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452
### 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 _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452
### 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 _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10
### 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 _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10
### 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 ( _ ) , _ from _ group by _ | 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
### 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 ( _ ) , _ from _ group by _ | 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