text
stringlengths
0
220
Natural Query: How many orders were placed for Rivera, Neal and Castillo between 2024-01-02 and 2024-03-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rivera, Neal and Castillo' AND order_date BETWEEN '2024-01-02' AND '2024-03-14'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Martinez-Mckinney 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 = 'Martinez-Mckinney'
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 six category with a price over $408.65.
SQL Query: SELECT * FROM products WHERE category = 'six' AND price > 408.65
Natural Query: How many orders were placed for Simmons-Miller between 2024-09-03 and 2024-09-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Simmons-Miller' AND order_date BETWEEN '2024-09-03' AND '2024-09-15'
Natural Query: What are the top 4 products by revenue for Finley, Carlson and Molina this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Finley, Carlson and Molina' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 4
Natural Query: How many orders were placed for Nelson-Clark between 2024-09-10 and 2024-09-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Nelson-Clark' AND order_date BETWEEN '2024-09-10' AND '2024-09-14'
Natural Query: List all products of Cox-Perkins ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Cox-Perkins' ORDER BY price ASC
Natural Query: Show me all products in the before category with a price over $555.12.
SQL Query: SELECT * FROM products WHERE category = 'before' AND price > 555.12
Natural Query: What is the total price of all products for Harris, Murphy and Hansen?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Harris, Murphy and Hansen'
Natural Query: What is the minimum rating of all products for Hudson PLC?
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Hudson PLC'
Natural Query: How many orders were placed for Bowen, Allen and Hayes between 2024-06-10 and 2024-09-03?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Bowen, Allen and Hayes' AND order_date BETWEEN '2024-06-10' AND '2024-09-03'
Natural Query: What are the top 5 products by orders for Hammond, Edwards and Wagner last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Hammond, Edwards and Wagner' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 5
Natural Query: What are the top 8 products by orders for Cervantes, Ferguson and Palmer this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Cervantes, Ferguson and Palmer' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 8
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Thompson, Perry and Winters 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 = 'Thompson, Perry and Winters'
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 Peters, Johnson and Powell.
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 = 'Peters, Johnson and Powell' GROUP BY c.customer_id
Natural Query: How many orders were placed for Rhodes-Burnett between 2024-08-21 and 2024-09-07?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rhodes-Burnett' AND order_date BETWEEN '2024-08-21' AND '2024-09-07'
Natural Query: How many orders were placed for Barnes-Martin between 2024-07-14 and 2024-08-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Barnes-Martin' AND order_date BETWEEN '2024-07-14' AND '2024-08-13'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Burgess 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 = 'Burgess LLC'
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 Valdez-Chambers 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 = 'Valdez-Chambers'
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 recent category with a price over $491.02.
SQL Query: SELECT * FROM products WHERE category = 'recent' AND price > 491.02
Natural Query: List all customers and their total order value for Young-Vasquez.
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 = 'Young-Vasquez' GROUP BY c.customer_id