text
stringlengths
0
220
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Ellis-Lee' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What is the total profit for each category in Wolf, Gray and Gardner?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Wolf, Gray and Gardner' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the total quantity of all products for Hester Ltd?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Hester Ltd'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Navarro-Morris 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 = 'Navarro-Morris'
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 products by customers for Bates, Smith and Mcdowell this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Bates, Smith and Mcdowell' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5
Natural Query: What are the top 4 products by sales for Serrano-Rubio this month?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Serrano-Rubio' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 4
Natural Query: What is the total profit for each category in Cook Inc?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Cook Inc' GROUP BY category ORDER BY total_profit DESC
Natural Query: What are the top 7 products by revenue for Parker, Silva and Simmons last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Parker, Silva and Simmons' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7
Natural Query: List all products of Shaffer, Green and Jennings ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Shaffer, Green and Jennings' ORDER BY rating ASC
Natural Query: What are the top 9 products by revenue for Allen and Sons this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Allen and Sons' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 9
Natural Query: Show me all products in the it category with a price over $597.64.
SQL Query: SELECT * FROM products WHERE category = 'it' AND price > 597.64
Natural Query: What are the top 6 products by revenue for Ellis Inc this month?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Ellis Inc' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6
Natural Query: What is the minimum price of all products for Jones Group?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Jones Group'
Natural Query: What is the minimum price of all products for Ramirez-Garcia?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Ramirez-Garcia'
Natural Query: What is the maximum quantity of all products for Rios PLC?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Rios PLC'
Natural Query: List all products of Faulkner, Smith and Aguirre ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Faulkner, Smith and Aguirre' ORDER BY price DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Turner 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 = 'Turner Inc'
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 like category with a price over $156.46.
SQL Query: SELECT * FROM products WHERE category = 'like' AND price > 156.46
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Williams, Pollard and Anderson 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, Pollard and Anderson'
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 give category with a price over $800.9.
SQL Query: SELECT * FROM products WHERE category = 'give' AND price > 800.9
Natural Query: List all customers and their total order value for Weber, Reed and Martin.
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 = 'Weber, Reed and Martin' GROUP BY c.customer_id
Natural Query: What are the top 4 products by revenue for Miller, Ramos and Davis all time?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Miller, Ramos and Davis' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 4
Natural Query: List all customers and their total order value for Murray 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 = 'Murray Ltd' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hernandez 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