text
stringlengths
0
220
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Medina-Barnes'
Natural Query: What is the total price of all products for Morris, Hernandez and Haney?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Morris, Hernandez and Haney'
Natural Query: List all products of Colon, Phillips and Thornton ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Colon, Phillips and Thornton' ORDER BY rating ASC
Natural Query: What is the total profit for each supplier in Campbell, Patel and Rollins?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Campbell, Patel and Rollins' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What is the average price of all products for Horton Group?
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Horton Group'
Natural Query: What are the top 4 products by customers for Osborn Inc this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Osborn Inc' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Harrison-Jenkins for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s
JOIN products p ON s.product_id = p.product_id
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Harrison-Jenkins'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Miller, Ingram and Cooke for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s
JOIN products p ON s.product_id = p.product_id
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Miller, Ingram and Cooke'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Pearson-Williams for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s
JOIN products p ON s.product_id = p.product_id
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Pearson-Williams'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: What is the total rating of all products for Burgess Ltd?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Burgess Ltd'
Natural Query: Show me all products in the sure category with a price over $702.33.
SQL Query: SELECT * FROM products WHERE category = 'sure' AND price > 702.33
Natural Query: What is the average quantity of all products for Crawford-Cardenas?
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Crawford-Cardenas'
Natural Query: How many orders were placed for Luna, Phillips and Hines between 2023-12-25 and 2024-01-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Luna, Phillips and Hines' AND order_date BETWEEN '2023-12-25' AND '2024-01-15'
Natural Query: What is the total quantity for each category in Mcdaniel, Ramirez and Garcia?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Mcdaniel, Ramirez and Garcia' GROUP BY category ORDER BY total_quantity DESC
Natural Query: List all products of Anderson and Sons ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Anderson and Sons' ORDER BY price DESC
Natural Query: What is the minimum price of all products for Alexander Inc?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Alexander Inc'
Natural Query: How many orders were placed for Mitchell, Manning and Ayers between 2024-05-21 and 2024-09-09?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mitchell, Manning and Ayers' AND order_date BETWEEN '2024-05-21' AND '2024-09-09'
Natural Query: List all products of Martin-Ortega ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Martin-Ortega' ORDER BY price DESC
Natural Query: List all customers and their total order value for Wilkinson-Huffman.
SQL Query: SELECT c.customer_name, SUM(o.order_total) as total_value FROM customers c JOIN orders o ON c.customer_id = o.customer_id WHERE c.company_name = 'Wilkinson-Huffman' GROUP BY c.customer_id
Natural Query: What is the average rating of all products for Phillips LLC?
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Phillips LLC'
Natural Query: What is the maximum price of all products for Taylor LLC?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Taylor LLC'
Natural Query: List all customers and their total order value for Miller, Bennett and Wood.
SQL Query: SELECT c.customer_name, SUM(o.order_total) as total_value FROM customers c JOIN orders o ON c.customer_id = o.customer_id WHERE c.company_name = 'Miller, Bennett and Wood' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mathews-Livingston for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s
JOIN products p ON s.product_id = p.product_id
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Mathews-Livingston'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)