text
stringlengths
0
220
Natural Query: List all customers and their total order value for Pratt Group.
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 = 'Pratt Group' GROUP BY c.customer_id
Natural Query: Show me all products in the particularly category with a price over $216.78.
SQL Query: SELECT * FROM products WHERE category = 'particularly' AND price > 216.78
Natural Query: How many orders were placed for Arellano PLC between 2024-06-19 and 2024-07-20?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Arellano PLC' AND order_date BETWEEN '2024-06-19' AND '2024-07-20'
Natural Query: What is the average quantity of all products for Valentine, Jensen and Moore?
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Valentine, Jensen and Moore'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Villanueva, Davis and Kelly 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 = 'Villanueva, Davis and Kelly'
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 8 products by sales for Williams Ltd this month?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Williams Ltd' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8
Natural Query: How many orders were placed for Stephens-Clark between 2023-12-24 and 2024-04-11?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Stephens-Clark' AND order_date BETWEEN '2023-12-24' AND '2024-04-11'
Natural Query: List all customers and their total order value for Young-James.
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-James' GROUP BY c.customer_id
Natural Query: List all products of Reynolds-Perry ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Reynolds-Perry' ORDER BY stock_quantity ASC
Natural Query: List all products of Allen, Chen and Byrd ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Allen, Chen and Byrd' ORDER BY rating ASC
Natural Query: List all customers and their total order value for Dawson-Weeks.
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 = 'Dawson-Weeks' GROUP BY c.customer_id
Natural Query: What is the average rating of all products for Walls, Johnson and Beck?
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Walls, Johnson and Beck'
Natural Query: List all customers and their total order value for Olson-Clark.
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 = 'Olson-Clark' GROUP BY c.customer_id
Natural Query: What is the total price of all products for Lee, Andrews and Lowery?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Lee, Andrews and Lowery'
Natural Query: What is the total price of all products for Johnson-Soto?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Johnson-Soto'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Johnson, Jenkins and Rodgers 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 = 'Johnson, Jenkins and Rodgers'
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 price of all products for Padilla, Reed and Simon?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Padilla, Reed and Simon'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Williams-Doyle 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 = 'Williams-Doyle'
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 suffer category with a price over $687.54.
SQL Query: SELECT * FROM products WHERE category = 'suffer' AND price > 687.54
Natural Query: What are the top 9 products by customers for Thomas Inc all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Thomas Inc' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9
Natural Query: List all products of Briggs, Gould and Horton ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Briggs, Gould and Horton' ORDER BY price DESC
Natural Query: Show me all products in the south category with a price over $328.75.
SQL Query: SELECT * FROM products WHERE category = 'south' AND price > 328.75
Natural Query: List all products of Keller, Lynch and Klein ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Keller, Lynch and Klein' ORDER BY price ASC
Natural Query: Show me all products in the Democrat category with a price over $983.0.
SQL Query: SELECT * FROM products WHERE category = 'Democrat' AND price > 983.0
Natural Query: What are the top 5 products by customers for Miller, Hardy and Jones all time?