text
stringlengths
0
220
Natural Query: List all products of Montgomery, Taylor and Lewis ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Montgomery, Taylor and Lewis' ORDER BY stock_quantity ASC
Natural Query: Show me all products in the ready category with a price over $162.35.
SQL Query: SELECT * FROM products WHERE category = 'ready' AND price > 162.35
Natural Query: What is the total profit for each country in Perkins, Oneal and Duncan?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Perkins, Oneal and Duncan' GROUP BY country ORDER BY total_profit DESC
Natural Query: List all customers and their total order value for Hampton, Porter and Little.
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 = 'Hampton, Porter and Little' GROUP BY c.customer_id
Natural Query: What is the total quantity for each category in Brown, Barnes and Schmidt?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Brown, Barnes and Schmidt' GROUP BY category ORDER BY total_quantity DESC
Natural Query: What is the total price of all products for Contreras, Bell and Torres?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Contreras, Bell and Torres'
Natural Query: What is the total price of all products for Cruz-Lutz?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Cruz-Lutz'
Natural Query: List all customers and their total order value for Gallegos-Diaz.
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 = 'Gallegos-Diaz' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Harvey, Case and Delgado 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 = 'Harvey, Case and Delgado'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: Show me all products in the billion category with a price over $187.85.
SQL Query: SELECT * FROM products WHERE category = 'billion' AND price > 187.85
Natural Query: What is the maximum quantity of all products for Clark and Sons?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Clark and Sons'
Natural Query: What is the minimum price of all products for Gilmore LLC?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Gilmore LLC'
Natural Query: What is the total quantity for each supplier in James, Thomas and Barrett?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'James, Thomas and Barrett' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: How many orders were placed for Jones, Taylor and Herrera between 2024-04-20 and 2024-09-11?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jones, Taylor and Herrera' AND order_date BETWEEN '2024-04-20' AND '2024-09-11'
Natural Query: Show me all products in the care category with a price over $464.2.
SQL Query: SELECT * FROM products WHERE category = 'care' AND price > 464.2
Natural Query: What is the total sales for each category in Gutierrez-Robinson?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Gutierrez-Robinson' GROUP BY category ORDER BY total_sales DESC
Natural Query: What are the top 4 products by customers for Saunders, Potter and Mueller this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Saunders, Potter and Mueller' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: What is the total profit for each country in Cook Inc?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Cook Inc' GROUP BY country ORDER BY total_profit DESC
Natural Query: List all customers and their total order value for Park LLC.
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 = 'Park LLC' GROUP BY c.customer_id
Natural Query: What are the top 3 products by orders for Moore, Cain and Berry this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Moore, Cain and Berry' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 3
Natural Query: List all customers and their total order value for Miller-Myers.
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-Myers' GROUP BY c.customer_id
Natural Query: What is the maximum price of all products for Thompson-Brown?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Thompson-Brown'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Marsh-Patterson 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 = 'Marsh-Patterson'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: List all customers and their total order value for Sullivan, Welch and Brown.
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 = 'Sullivan, Welch and Brown' GROUP BY c.customer_id
Natural Query: What are the top 10 products by sales for Mendez, Burke and Myers all time?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Mendez, Burke and Myers' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 10
Natural Query: Show me all products in the experience category with a price over $298.19.
SQL Query: SELECT * FROM products WHERE category = 'experience' AND price > 298.19
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hughes LLC 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