text
stringlengths
0
220
Natural Query: List all products of Wright Inc ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Wright Inc' ORDER BY rating DESC
Natural Query: What is the average price of all products for Williams and Sons?
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Williams and Sons'
Natural Query: What is the total price of all products for Morrison-Anderson?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Morrison-Anderson'
Natural Query: What is the total quantity of all products for Brown Ltd?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Brown Ltd'
Natural Query: What is the maximum quantity of all products for Price and Sons?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Price and Sons'
Natural Query: What is the total profit for each category in Andrews, Evans and Powell?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Andrews, Evans and Powell' GROUP BY category ORDER BY total_profit DESC
Natural Query: How many orders were placed for Fields-Valencia between 2024-02-20 and 2024-05-25?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Fields-Valencia' AND order_date BETWEEN '2024-02-20' AND '2024-05-25'
Natural Query: Show me all products in the view category with a price over $794.98.
SQL Query: SELECT * FROM products WHERE category = 'view' AND price > 794.98
Natural Query: How many orders were placed for Horn Ltd between 2024-02-13 and 2024-08-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Horn Ltd' AND order_date BETWEEN '2024-02-13' AND '2024-08-14'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Fox 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 = 'Fox 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 quantity for each category in Martinez-Rocha?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Martinez-Rocha' GROUP BY category ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mendoza Group 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 = 'Mendoza Group'
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 Osborne, Vincent and Banks 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 = 'Osborne, Vincent and Banks'
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 far category with a price over $847.96.
SQL Query: SELECT * FROM products WHERE category = 'far' AND price > 847.96
Natural Query: What is the total sales for each supplier in Johnson Group?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnson Group' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: Show me all products in the conference category with a price over $734.06.
SQL Query: SELECT * FROM products WHERE category = 'conference' AND price > 734.06
Natural Query: List all customers and their total order value for Gross-Bowman.
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 = 'Gross-Bowman' GROUP BY c.customer_id
Natural Query: List all products of Mcguire-Henderson ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Mcguire-Henderson' ORDER BY rating ASC
Natural Query: What is the total profit for each supplier in Hernandez, Herrera and Lewis?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Hernandez, Herrera and Lewis' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Powell and Sons 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 = 'Powell and Sons'
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 unit category with a price over $576.85.
SQL Query: SELECT * FROM products WHERE category = 'unit' AND price > 576.85
Natural Query: What is the total sales for each country in Le-Lee?