text
stringlengths
0
220
Natural Query: List all customers and their total order value for Brown Group.
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 = 'Brown Group' GROUP BY c.customer_id
Natural Query: Show me all products in the everybody category with a price over $537.35.
SQL Query: SELECT * FROM products WHERE category = 'everybody' AND price > 537.35
Natural Query: List all products of Caldwell PLC ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Caldwell PLC' ORDER BY stock_quantity DESC
Natural Query: How many orders were placed for Dickerson-Wright between 2023-10-24 and 2024-01-07?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Dickerson-Wright' AND order_date BETWEEN '2023-10-24' AND '2024-01-07'
Natural Query: What is the maximum quantity of all products for Huff, Carney and Porter?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Huff, Carney and Porter'
Natural Query: List all customers and their total order value for Kirk Inc.
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 = 'Kirk Inc' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Dominguez, Smith and Cunningham.
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 = 'Dominguez, Smith and Cunningham' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Brown 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 = 'Brown LLC' GROUP BY c.customer_id
Natural Query: Show me all products in the security category with a price over $784.4.
SQL Query: SELECT * FROM products WHERE category = 'security' AND price > 784.4
Natural Query: List all customers and their total order value for Jackson Ltd.
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 = 'Jackson Ltd' GROUP BY c.customer_id
Natural Query: What is the total quantity for each supplier in Price-White?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Price-White' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Meyer Inc 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 = 'Meyer Inc'
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 quantity for each supplier in Robinson and Sons?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Robinson and Sons' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: How many orders were placed for Peterson-Jackson between 2024-03-07 and 2024-08-04?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Peterson-Jackson' AND order_date BETWEEN '2024-03-07' AND '2024-08-04'
Natural Query: Show me all products in the sea category with a price over $690.66.
SQL Query: SELECT * FROM products WHERE category = 'sea' AND price > 690.66
Natural Query: What is the total profit for each category in Vega Inc?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Vega Inc' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the total profit for each country in Moore, Olsen and Gray?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Moore, Olsen and Gray' GROUP BY country ORDER BY total_profit DESC
Natural Query: How many orders were placed for Walters Group between 2024-03-31 and 2024-07-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Walters Group' AND order_date BETWEEN '2024-03-31' AND '2024-07-01'
Natural Query: List all customers and their total order value for Brown, Bond and Sandoval.
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 = 'Brown, Bond and Sandoval' GROUP BY c.customer_id
Natural Query: List all products of Donaldson Ltd ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Donaldson Ltd' ORDER BY stock_quantity ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Whitaker PLC 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 = 'Whitaker PLC'
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 Buckley, Shields and Sullivan.
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 = 'Buckley, Shields and Sullivan' GROUP BY c.customer_id
Natural Query: Show me all products in the best category with a price over $453.17.
SQL Query: SELECT * FROM products WHERE category = 'best' AND price > 453.17
Natural Query: How many orders were placed for Henson-Morgan between 2023-12-16 and 2024-02-04?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Henson-Morgan' AND order_date BETWEEN '2023-12-16' AND '2024-02-04'
Natural Query: How many orders were placed for Perez, Patrick and Robles between 2024-06-07 and 2024-06-24?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Perez, Patrick and Robles' AND order_date BETWEEN '2024-06-07' AND '2024-06-24'
Natural Query: List all products of Taylor, Knight and Nelson ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Taylor, Knight and Nelson' ORDER BY stock_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Kelly and Sons for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s