text
stringlengths
0
220
Natural Query: Show me all products in the child category with a price over $293.1.
SQL Query: SELECT * FROM products WHERE category = 'child' AND price > 293.1
Natural Query: List all customers and their total order value for Mejia, Rivas and Oliver.
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 = 'Mejia, Rivas and Oliver' GROUP BY c.customer_id
Natural Query: Show me all products in the attorney category with a price over $842.81.
SQL Query: SELECT * FROM products WHERE category = 'attorney' AND price > 842.81
Natural Query: List all customers and their total order value for Hall 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 = 'Hall LLC' GROUP BY c.customer_id
Natural Query: What is the total sales for each category in Conner-Fitzgerald?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Conner-Fitzgerald' GROUP BY category ORDER BY total_sales DESC
Natural Query: What is the total quantity for each country in Hunt, Mitchell and Burton?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Hunt, Mitchell and Burton' GROUP BY country ORDER BY total_quantity DESC
Natural Query: How many orders were placed for Johnson, Blanchard and Chambers between 2023-10-31 and 2023-11-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson, Blanchard and Chambers' AND order_date BETWEEN '2023-10-31' AND '2023-11-15'
Natural Query: List all products of Moran LLC ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Moran LLC' ORDER BY rating DESC
Natural Query: How many orders were placed for Gonzalez, Cain and Hoffman between 2024-02-17 and 2024-07-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gonzalez, Cain and Hoffman' AND order_date BETWEEN '2024-02-17' AND '2024-07-14'
Natural Query: Show me all products in the accept category with a price over $576.06.
SQL Query: SELECT * FROM products WHERE category = 'accept' AND price > 576.06
Natural Query: How many orders were placed for Thomas and Sons between 2023-09-22 and 2024-07-27?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thomas and Sons' AND order_date BETWEEN '2023-09-22' AND '2024-07-27'
Natural Query: List all products of Wood, Serrano and Fuller ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Wood, Serrano and Fuller' ORDER BY stock_quantity ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Miller PLC 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 = 'Miller PLC'
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 Calderon, Chang and Johnson between 2024-07-28 and 2024-09-16?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Calderon, Chang and Johnson' AND order_date BETWEEN '2024-07-28' AND '2024-09-16'
Natural Query: What is the maximum rating of all products for Perez, Mclean and Simon?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Perez, Mclean and Simon'
Natural Query: List all products of Welch LLC ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Welch LLC' ORDER BY price DESC
Natural Query: Show me all products in the team category with a price over $285.65.
SQL Query: SELECT * FROM products WHERE category = 'team' AND price > 285.65
Natural Query: List all customers and their total order value for Rodriguez-Roth.
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 = 'Rodriguez-Roth' GROUP BY c.customer_id
Natural Query: How many orders were placed for Johnson, Lee and Rodriguez between 2023-11-20 and 2024-05-17?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson, Lee and Rodriguez' AND order_date BETWEEN '2023-11-20' AND '2024-05-17'
Natural Query: What is the minimum price of all products for Campbell, Garcia and Reese?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Campbell, Garcia and Reese'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Brown, Gonzalez and Robinson 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 = 'Brown, Gonzalez and Robinson'
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 door category with a price over $989.4.
SQL Query: SELECT * FROM products WHERE category = 'door' AND price > 989.4
Natural Query: What are the top 10 products by revenue for Adams Ltd this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Adams Ltd' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10
Natural Query: What are the top 4 products by orders for Schwartz Inc all time?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Schwartz Inc' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4
Natural Query: What is the average rating of all products for White Ltd?
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'White Ltd'
Natural Query: What are the top 6 products by orders for Lopez-White this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Lopez-White' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6
Natural Query: How many orders were placed for Gilbert, Pineda and Burns between 2024-02-15 and 2024-02-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gilbert, Pineda and Burns' AND order_date BETWEEN '2024-02-15' AND '2024-02-15'
Natural Query: What are the top 10 products by orders for Wheeler, Fleming and Davis this month?