text
stringlengths
0
220
Natural Query: What is the total quantity for each supplier in Pope, Scott and Swanson?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Pope, Scott and Swanson' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What is the total sales for each supplier in Davis-Lowe?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Davis-Lowe' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: List all customers and their total order value for Lara and Sons.
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 = 'Lara and Sons' GROUP BY c.customer_id
Natural Query: What is the total rating of all products for Smith, Lewis and Mooney?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Smith, Lewis and Mooney'
Natural Query: What are the top 3 products by orders for Williams-Lynch all time?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Williams-Lynch' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 3
Natural Query: How many orders were placed for Sullivan, Smith and Wang between 2024-06-01 and 2024-06-28?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Sullivan, Smith and Wang' AND order_date BETWEEN '2024-06-01' AND '2024-06-28'
Natural Query: How many orders were placed for Villanueva-Hale between 2024-04-13 and 2024-06-06?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Villanueva-Hale' AND order_date BETWEEN '2024-04-13' AND '2024-06-06'
Natural Query: What are the top 10 products by customers for Thompson and Sons last quarter?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Thompson and Sons' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10
Natural Query: How many orders were placed for Cooley-Ward between 2024-07-31 and 2024-09-06?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cooley-Ward' AND order_date BETWEEN '2024-07-31' AND '2024-09-06'
Natural Query: Show me all products in the require category with a price over $588.76.
SQL Query: SELECT * FROM products WHERE category = 'require' AND price > 588.76
Natural Query: How many orders were placed for Guerra-Knox between 2023-12-05 and 2024-04-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Guerra-Knox' AND order_date BETWEEN '2023-12-05' AND '2024-04-13'
Natural Query: List all customers and their total order value for Hunter 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 = 'Hunter Group' GROUP BY c.customer_id
Natural Query: How many orders were placed for Stevens-Cox between 2023-10-18 and 2024-04-06?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Stevens-Cox' AND order_date BETWEEN '2023-10-18' AND '2024-04-06'
Natural Query: How many orders were placed for Mullen, Johnson and Brennan between 2024-05-04 and 2024-08-23?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mullen, Johnson and Brennan' AND order_date BETWEEN '2024-05-04' AND '2024-08-23'
Natural Query: Show me all products in the almost category with a price over $921.01.
SQL Query: SELECT * FROM products WHERE category = 'almost' AND price > 921.01
Natural Query: Show me all products in the I category with a price over $141.85.
SQL Query: SELECT * FROM products WHERE category = 'I' AND price > 141.85
Natural Query: List all products of Johnson-Kaiser ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson-Kaiser' ORDER BY price ASC
Natural Query: What is the total sales for each country in Jones-Powers?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Jones-Powers' GROUP BY country ORDER BY total_sales DESC
Natural Query: List all customers and their total order value for Jones, Montes and Baker.
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 = 'Jones, Montes and Baker' GROUP BY c.customer_id
Natural Query: What are the top 8 products by sales for Wilson-Wright all time?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Wilson-Wright' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8
Natural Query: What is the total rating of all products for Olsen, Baxter and Ortiz?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Olsen, Baxter and Ortiz'
Natural Query: How many orders were placed for Lane, Beck and Henderson between 2024-03-27 and 2024-05-23?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lane, Beck and Henderson' AND order_date BETWEEN '2024-03-27' AND '2024-05-23'
Natural Query: Show me all products in the product category with a price over $829.44.
SQL Query: SELECT * FROM products WHERE category = 'product' AND price > 829.44
Natural Query: What is the total sales for each category in Young, Lee and Shepard?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Young, Lee and Shepard' GROUP BY category ORDER BY total_sales DESC
Natural Query: What is the total sales for each category in Doyle, Ryan and Curtis?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Doyle, Ryan and Curtis' GROUP BY category ORDER BY total_sales DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Williams 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
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Williams LLC'
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 profit for each supplier in Odom-Copeland?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Odom-Copeland' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What is the maximum price of all products for Graham, Ward and Brown?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Graham, Ward and Brown'
Natural Query: Show me all products in the third category with a price over $703.65.
SQL Query: SELECT * FROM products WHERE category = 'third' AND price > 703.65
Natural Query: What is the total price of all products for Schmidt Ltd?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Schmidt Ltd'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Miller Inc for the last quarter?