text
stringlengths
0
220
Natural Query: List all products of Walsh LLC ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Walsh LLC' ORDER BY price ASC
Natural Query: What is the minimum quantity of all products for Edwards-Nunez?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Edwards-Nunez'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Price-Mclean 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 = 'Price-Mclean'
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 10 products by orders for Anderson, Woodard and Clark this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Anderson, Woodard and Clark' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 10
Natural Query: List all customers and their total order value for Brewer, Jackson and Whitehead.
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 = 'Brewer, Jackson and Whitehead' GROUP BY c.customer_id
Natural Query: List all products of Mcdaniel, Johnson and Thompson ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Mcdaniel, Johnson and Thompson' ORDER BY stock_quantity DESC
Natural Query: What is the total quantity of all products for Harris PLC?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Harris PLC'
Natural Query: What is the average quantity of all products for Reid-Guzman?
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Reid-Guzman'
Natural Query: Show me all products in the anyone category with a price over $520.48.
SQL Query: SELECT * FROM products WHERE category = 'anyone' AND price > 520.48
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Davidson-Ramirez 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 = 'Davidson-Ramirez'
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 policy category with a price over $732.01.
SQL Query: SELECT * FROM products WHERE category = 'policy' AND price > 732.01
Natural Query: What is the total rating of all products for Alvarez-Jones?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Alvarez-Jones'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Stone 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 = 'Stone 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 is the minimum quantity of all products for Phillips Ltd?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Phillips Ltd'
Natural Query: How many orders were placed for Becker and Sons between 2024-05-16 and 2024-06-05?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Becker and Sons' AND order_date BETWEEN '2024-05-16' AND '2024-06-05'
Natural Query: How many orders were placed for Vega-Ford between 2024-06-10 and 2024-06-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Vega-Ford' AND order_date BETWEEN '2024-06-10' AND '2024-06-15'
Natural Query: List all products of Murphy-Bryant ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Murphy-Bryant' ORDER BY price ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ruiz, Hill and Santos 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 = 'Ruiz, Hill and Santos'
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 Frank, Carpenter and Martinez ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Frank, Carpenter and Martinez' ORDER BY price DESC
Natural Query: List all customers and their total order value for Russell, Sanchez and Benson.
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 = 'Russell, Sanchez and Benson' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mosley, Evans and Mueller 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