[ { "instruction": "Database Schema:\n```sql\nTable: customers\n Column: CustomerID int(11) NO PRI None auto_increment\n Column: Name varchar(255) YES None \n Column: Email varchar(255) YES None \n Column: Phone varchar(50) YES None \nTable: orderdetails\n Column: OrderDetailID int(11) NO PRI None auto_increment\n Column: OrderID int(11) YES MUL None \n Column: ProductID int(11) YES MUL None \n Column: Quantity int(11) YES None \nTable: orders\n Column: OrderID int(11) NO PRI None auto_increment\n Column: CustomerID int(11) YES MUL None \n Column: OrderDate date YES None \nTable: products\n Column: ProductID int(11) NO PRI None auto_increment\n Column: Name varchar(255) YES None \n Column: Price decimal(10,2) YES None \n```", "input": "", "output": "" }, { "instruction": "Sample scripts for table: customers\n```sql\nSELECT * FROM customers WHERE 1 = '1';\nSELECT * FROM customers WHERE 2 = '2';\nSELECT * FROM customers WHERE 3 = '3';\nSELECT * FROM customers WHERE 4 = '4';\nSELECT * FROM customers WHERE 5 = '5';\n```", "input": "", "output": "" }, { "instruction": "Sample scripts for table: orderdetails\n```sql\nSELECT * FROM orderdetails WHERE 1 = '1';\nSELECT * FROM orderdetails WHERE 2 = '2';\nSELECT * FROM orderdetails WHERE 3 = '3';\nSELECT * FROM orderdetails WHERE 4 = '4';\nSELECT * FROM orderdetails WHERE 5 = '5';\n```", "input": "", "output": "" }, { "instruction": "Sample scripts for table: orders\n```sql\nSELECT * FROM orders WHERE 1 = '1';\nSELECT * FROM orders WHERE 2 = '2';\nSELECT * FROM orders WHERE 3 = '3';\nSELECT * FROM orders WHERE 4 = '4';\nSELECT * FROM orders WHERE 5 = '5';\n```", "input": "", "output": "" }, { "instruction": "Sample scripts for table: products\n```sql\nSELECT * FROM products WHERE 1 = '1';\nSELECT * FROM products WHERE 2 = '2';\nSELECT * FROM products WHERE 3 = '3';\nSELECT * FROM products WHERE 4 = '4';\nSELECT * FROM products WHERE 5 = '5';\n```", "input": "", "output": "" }, { "instruction": "Find the average price of all products.", "input": "", "output": "The average price of all products is $X." }, { "instruction": "List all customers whose name starts with 'A'.", "input": "", "output": "Customers whose name starts with 'A':\n- Customer 1\n- Customer 2\n- ..." }, { "instruction": "Calculate the total number of orders for each customer.", "input": "", "output": "Customer 1: X orders\nCustomer 2: Y orders\n..." }, { "instruction": "What is the email of the customer with CustomerID 1?", "input": "", "output": "The email of the customer with CustomerID 1 is pagemichelle@example.com." }, { "instruction": "What is the name of the customer with CustomerID 1?", "input": "", "output": "The name of the customer with CustomerID 1 is Katherine Riley." }, { "instruction": "What is the email of the customer with CustomerID 2?", "input": "", "output": "The email of the customer with CustomerID 2 is kelsey13@example.com." }, { "instruction": "What is the name of the customer with CustomerID 2?", "input": "", "output": "The name of the customer with CustomerID 2 is Patricia Holmes." }, { "instruction": "What is the email of the customer with CustomerID 3?", "input": "", "output": "The email of the customer with CustomerID 3 is krystalbanks@example.com." }, { "instruction": "What is the name of the customer with CustomerID 3?", "input": "", "output": "The name of the customer with CustomerID 3 is Kathleen Lopez." }, { "instruction": "What is the email of the customer with CustomerID 4?", "input": "", "output": "The email of the customer with CustomerID 4 is stevenfrank@example.net." }, { "instruction": "What is the name of the customer with CustomerID 4?", "input": "", "output": "The name of the customer with CustomerID 4 is Melissa Herrera." }, { "instruction": "What is the email of the customer with CustomerID 5?", "input": "", "output": "The email of the customer with CustomerID 5 is turnerheather@example.org." }, { "instruction": "What is the name of the customer with CustomerID 5?", "input": "", "output": "The name of the customer with CustomerID 5 is Richard Gillespie." }, { "instruction": "What is the email of the customer with CustomerID 6?", "input": "", "output": "The email of the customer with CustomerID 6 is amanda13@example.com." }, { "instruction": "What is the name of the customer with CustomerID 6?", "input": "", "output": "The name of the customer with CustomerID 6 is Amber Bennett." }, { "instruction": "What is the email of the customer with CustomerID 7?", "input": "", "output": "The email of the customer with CustomerID 7 is claytonmelinda@example.com." }, { "instruction": "What is the name of the customer with CustomerID 7?", "input": "", "output": "The name of the customer with CustomerID 7 is Nicholas Butler." }, { "instruction": "What is the email of the customer with CustomerID 8?", "input": "", "output": "The email of the customer with CustomerID 8 is rose75@example.net." }, { "instruction": "What is the name of the customer with CustomerID 8?", "input": "", "output": "The name of the customer with CustomerID 8 is Victor Cardenas." }, { "instruction": "What is the email of the customer with CustomerID 9?", "input": "", "output": "The email of the customer with CustomerID 9 is nguyenderek@example.org." }, { "instruction": "What is the name of the customer with CustomerID 9?", "input": "", "output": "The name of the customer with CustomerID 9 is Anita Stewart." }, { "instruction": "What is the email of the customer with CustomerID 10?", "input": "", "output": "The email of the customer with CustomerID 10 is perrysamantha@example.org." }, { "instruction": "What is the name of the customer with CustomerID 10?", "input": "", "output": "The name of the customer with CustomerID 10 is David Clark." }, { "instruction": "How many orders did the customer with CustomerID 1 place?", "input": "", "output": "The customer with CustomerID 1 placed 2 orders." }, { "instruction": "How many orders did the customer with CustomerID 3 place?", "input": "", "output": "The customer with CustomerID 3 placed 3 orders." }, { "instruction": "How many orders did the customer with CustomerID 4 place?", "input": "", "output": "The customer with CustomerID 4 placed 3 orders." }, { "instruction": "How many orders did the customer with CustomerID 5 place?", "input": "", "output": "The customer with CustomerID 5 placed 2 orders." }, { "instruction": "How many orders did the customer with CustomerID 6 place?", "input": "", "output": "The customer with CustomerID 6 placed 4 orders." }, { "instruction": "How many orders did the customer with CustomerID 7 place?", "input": "", "output": "The customer with CustomerID 7 placed 2 orders." }, { "instruction": "How many orders did the customer with CustomerID 8 place?", "input": "", "output": "The customer with CustomerID 8 placed 1 orders." }, { "instruction": "How many orders did the customer with CustomerID 9 place?", "input": "", "output": "The customer with CustomerID 9 placed 6 orders." }, { "instruction": "How many orders did the customer with CustomerID 10 place?", "input": "", "output": "The customer with CustomerID 10 placed 1 orders." }, { "instruction": "How many orders did the customer with CustomerID 11 place?", "input": "", "output": "The customer with CustomerID 11 placed 1 orders." }, { "instruction": "What is the price of reduce?", "input": "", "output": "The price of reduce is $95.71." }, { "instruction": "What is the price of suddenly?", "input": "", "output": "The price of suddenly is $295.39." }, { "instruction": "What is the price of happen?", "input": "", "output": "The price of happen is $373.73." }, { "instruction": "What is the price of player?", "input": "", "output": "The price of player is $251.23." }, { "instruction": "What is the price of likely?", "input": "", "output": "The price of likely is $333.92." }, { "instruction": "What is the price of experience?", "input": "", "output": "The price of experience is $160.00." }, { "instruction": "What is the price of improve?", "input": "", "output": "The price of improve is $378.76." }, { "instruction": "What is the price of structure?", "input": "", "output": "The price of structure is $425.14." }, { "instruction": "What is the price of arm?", "input": "", "output": "The price of arm is $196.57." }, { "instruction": "What is the price of which?", "input": "", "output": "The price of which is $7.95." }, { "instruction": "Fetch all orders with customer names and product details.", "input": "", "output": "```sql\nSELECT Orders.OrderID, Customers.Name AS CustomerName, Products.Name AS ProductName, OrderDetails.Quantity\n FROM Orders\n JOIN Customers ON Orders.CustomerID = Customers.CustomerID\n JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID\n JOIN Products ON OrderDetails.ProductID = Products.ProductID\n LIMIT 10;\n```" }, { "instruction": "Find customers who have placed more than one order.", "input": "", "output": "```sql\nSELECT Name, Email\n FROM Customers\n WHERE CustomerID IN (\n SELECT CustomerID\n FROM Orders\n GROUP BY CustomerID\n HAVING COUNT(OrderID) > 1\n )\n LIMIT 10;\n```" }, { "instruction": "Calculate the total sales for each product.", "input": "", "output": "```sql\nSELECT Products.Name, SUM(OrderDetails.Quantity * Products.Price) AS TotalSales\n FROM OrderDetails\n JOIN Products ON OrderDetails.ProductID = Products.ProductID\n GROUP BY Products.Name\n LIMIT 10;\n```" }, { "instruction": "Calculate running total of orders for each customer.", "input": "", "output": "```sql\nSELECT Orders.OrderID, Orders.CustomerID, Customers.Name,\n Orders.OrderDate, \n SUM(OrderDetails.Quantity * Products.Price) OVER (PARTITION BY Orders.CustomerID ORDER BY Orders.OrderDate) AS RunningTotal\n FROM Orders\n JOIN Customers ON Orders.CustomerID = Customers.CustomerID\n JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID\n JOIN Products ON OrderDetails.ProductID = Products.ProductID\n LIMIT 10;\n```" } ]