text
stringlengths
0
220
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hanson-Watts 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 = 'Hanson-Watts'
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 Coleman Inc?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Coleman Inc' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lopez, Vargas and Thompson 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 = 'Lopez, Vargas and Thompson'
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 West, Thomas and Robinson 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 = 'West, Thomas and Robinson'
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 of all products for Moore-Little?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Moore-Little'
Natural Query: How many orders were placed for Gould-York between 2024-05-19 and 2024-08-24?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gould-York' AND order_date BETWEEN '2024-05-19' AND '2024-08-24'
Natural Query: What are the top 3 products by revenue for Fowler-Price last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Fowler-Price' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3
Natural Query: Show me all products in the network category with a price over $431.85.
SQL Query: SELECT * FROM products WHERE category = 'network' AND price > 431.85
Natural Query: What is the total profit for each country in Brown Group?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Brown Group' GROUP BY country ORDER BY total_profit DESC
Natural Query: How many orders were placed for Hernandez-Klein between 2024-05-26 and 2024-08-21?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hernandez-Klein' AND order_date BETWEEN '2024-05-26' AND '2024-08-21'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ramos-Lee 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 = 'Ramos-Lee'
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 3 products by revenue for Garcia-Barnes this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Garcia-Barnes' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3
Natural Query: What is the maximum rating of all products for Fisher-Lewis?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Fisher-Lewis'
Natural Query: How many orders were placed for Singh-Scott between 2024-01-26 and 2024-05-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Singh-Scott' AND order_date BETWEEN '2024-01-26' AND '2024-05-15'
Natural Query: Show me all products in the night category with a price over $608.39.
SQL Query: SELECT * FROM products WHERE category = 'night' AND price > 608.39
Natural Query: What is the maximum price of all products for Welch-Ibarra?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Welch-Ibarra'
Natural Query: Show me all products in the all category with a price over $379.4.
SQL Query: SELECT * FROM products WHERE category = 'all' AND price > 379.4
Natural Query: How many orders were placed for Miller Inc between 2024-01-28 and 2024-09-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Miller Inc' AND order_date BETWEEN '2024-01-28' AND '2024-09-15'
Natural Query: What are the top 10 products by customers for Bryant, Delgado and Snyder all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Bryant, Delgado and Snyder' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Olson-Nelson 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 = 'Olson-Nelson'