text
stringlengths
0
220
Natural Query: What is the total quantity for each supplier in Richardson, Martin and Murphy?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Richardson, Martin and Murphy' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Murphy, Gallagher and Hansen 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 = 'Murphy, Gallagher and Hansen'
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 Brown-Hamilton.
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-Hamilton' GROUP BY c.customer_id
Natural Query: How many orders were placed for Carter Inc between 2023-10-19 and 2024-03-24?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Carter Inc' AND order_date BETWEEN '2023-10-19' AND '2024-03-24'
Natural Query: Show me all products in the first category with a price over $209.75.
SQL Query: SELECT * FROM products WHERE category = 'first' AND price > 209.75
Natural Query: List all products of Patterson, Smith and Roth ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Patterson, Smith and Roth' ORDER BY rating ASC
Natural Query: Show me all products in the purpose category with a price over $13.37.
SQL Query: SELECT * FROM products WHERE category = 'purpose' AND price > 13.37
Natural Query: What is the total rating of all products for Mcdowell-Fischer?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Mcdowell-Fischer'
Natural Query: List all products of Greene-Taylor ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Greene-Taylor' ORDER BY stock_quantity ASC
Natural Query: How many orders were placed for Cole-Tucker between 2024-04-26 and 2024-06-19?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cole-Tucker' AND order_date BETWEEN '2024-04-26' AND '2024-06-19'
Natural Query: List all products of Rice, Mcintyre and Morris ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Rice, Mcintyre and Morris' ORDER BY rating ASC
Natural Query: List all products of Lam Inc ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Lam Inc' ORDER BY stock_quantity DESC
Natural Query: What is the total quantity of all products for Dawson LLC?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Dawson LLC'
Natural Query: What are the top 6 products by orders for Dickson, Gonzales and Sanchez all time?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Dickson, Gonzales and Sanchez' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6
Natural Query: What is the total sales for each category in Weber, Alvarado and Frederick?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Weber, Alvarado and Frederick' GROUP BY category ORDER BY total_sales DESC
Natural Query: List all products of Powers-Wallace ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Powers-Wallace' ORDER BY rating DESC
Natural Query: What are the top 3 products by orders for Aguilar-Moon this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Aguilar-Moon' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 3
Natural Query: List all customers and their total order value for Pena, Moore and Oneal.
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 = 'Pena, Moore and Oneal' GROUP BY c.customer_id
Natural Query: What is the total profit for each category in Watson and Sons?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Watson and Sons' GROUP BY category ORDER BY total_profit DESC
Natural Query: How many orders were placed for Kline, Conley and Morales between 2023-10-19 and 2024-02-18?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Kline, Conley and Morales' AND order_date BETWEEN '2023-10-19' AND '2024-02-18'
Natural Query: What is the total profit for each supplier in Thompson-Martinez?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Thompson-Martinez' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: List all customers and their total order value for Garcia 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 = 'Garcia and Sons' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ward-Martinez 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 = 'Ward-Martinez'
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 products of Moore Ltd ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Moore Ltd' ORDER BY rating DESC
Natural Query: Show me all products in the peace category with a price over $747.62.
SQL Query: SELECT * FROM products WHERE category = 'peace' AND price > 747.62
Natural Query: What are the top 10 products by revenue for Stevenson, Martinez and Duncan last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Stevenson, Martinez and Duncan' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10
Natural Query: What is the total sales for each supplier in Young-Mills?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Young-Mills' GROUP BY supplier ORDER BY total_sales DESC