text
stringlengths
0
220
Natural Query: Show me all products in the thing category with a price over $599.35.
SQL Query: SELECT * FROM products WHERE category = 'thing' AND price > 599.35
Natural Query: Show me all products in the treat category with a price over $49.67.
SQL Query: SELECT * FROM products WHERE category = 'treat' AND price > 49.67
Natural Query: Show me all products in the lot category with a price over $103.04.
SQL Query: SELECT * FROM products WHERE category = 'lot' AND price > 103.04
Natural Query: List all customers and their total order value for Watson, Morales and Johnson.
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 = 'Watson, Morales and Johnson' GROUP BY c.customer_id
Natural Query: Show me all products in the debate category with a price over $680.74.
SQL Query: SELECT * FROM products WHERE category = 'debate' AND price > 680.74
Natural Query: List all products of Hartman Group ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Hartman Group' ORDER BY stock_quantity DESC
Natural Query: What are the top 4 products by customers for Martin-Adams all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Martin-Adams' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: How many orders were placed for Parsons-Moore between 2023-09-20 and 2024-07-31?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Parsons-Moore' AND order_date BETWEEN '2023-09-20' AND '2024-07-31'
Natural Query: What is the total quantity of all products for Garcia, Barker and Martinez?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Garcia, Barker and Martinez'
Natural Query: Show me all products in the world category with a price over $859.97.
SQL Query: SELECT * FROM products WHERE category = 'world' AND price > 859.97
Natural Query: What is the maximum price of all products for Murray-Gutierrez?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Murray-Gutierrez'
Natural Query: What are the top 3 products by revenue for Young, Mckenzie and Ballard all time?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Young, Mckenzie and Ballard' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3
Natural Query: How many orders were placed for York, Rivera and Hudson between 2024-02-10 and 2024-02-23?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'York, Rivera and Hudson' AND order_date BETWEEN '2024-02-10' AND '2024-02-23'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Evans 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 = 'Evans 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: List all customers and their total order value for Smith, Davidson and Hill.
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 = 'Smith, Davidson and Hill' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Wilson 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 = 'Wilson LLC'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: How many orders were placed for Mccormick, Austin and Berger between 2023-10-04 and 2024-06-11?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mccormick, Austin and Berger' AND order_date BETWEEN '2023-10-04' AND '2024-06-11'
Natural Query: What are the top 4 products by orders for Bradley-Best all time?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Bradley-Best' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4
Natural Query: List all customers and their total order value for Cervantes-Gonzalez.
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 = 'Cervantes-Gonzalez' GROUP BY c.customer_id
Natural Query: Show me all products in the run category with a price over $896.56.
SQL Query: SELECT * FROM products WHERE category = 'run' AND price > 896.56
Natural Query: What are the top 7 products by sales for Valenzuela and Sons all time?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Valenzuela and Sons' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7
Natural Query: What is the minimum quantity of all products for Williams, Kirk and George?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Williams, Kirk and George'
Natural Query: What is the total quantity for each category in Garcia, Pierce and Anderson?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Garcia, Pierce and Anderson' GROUP BY category ORDER BY total_quantity DESC
Natural Query: Show me all products in the outside category with a price over $389.86.
SQL Query: SELECT * FROM products WHERE category = 'outside' AND price > 389.86
Natural Query: What is the average price of all products for James LLC?
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'James LLC'
Natural Query: List all products of Baker Inc ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Baker Inc' ORDER BY stock_quantity ASC
Natural Query: List all customers and their total order value for Powers LLC.
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 = 'Powers LLC' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Bennett, Nelson and Clark.