text
stringlengths
0
220
SQL Query: SELECT * FROM products WHERE category = 'institution' AND price > 322.23
Natural Query: How many orders were placed for Miller Group between 2024-07-20 and 2024-07-23?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Miller Group' AND order_date BETWEEN '2024-07-20' AND '2024-07-23'
Natural Query: How many orders were placed for Blackwell Group between 2023-10-01 and 2024-02-28?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Blackwell Group' AND order_date BETWEEN '2023-10-01' AND '2024-02-28'
Natural Query: What is the total profit for each category in Griffin, Bryant and Hamilton?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Griffin, Bryant and Hamilton' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the total quantity for each country in Edwards, Stewart and Larsen?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Edwards, Stewart and Larsen' GROUP BY country ORDER BY total_quantity DESC
Natural Query: What is the maximum price of all products for Jones, Beck and Melendez?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Jones, Beck and Melendez'
Natural Query: Show me all products in the talk category with a price over $162.79.
SQL Query: SELECT * FROM products WHERE category = 'talk' AND price > 162.79
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Coleman-Phillips 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 = 'Coleman-Phillips'
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 maximum quantity of all products for Hickman, Larson and Weaver?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Hickman, Larson and Weaver'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Goodwin-Stewart 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 = 'Goodwin-Stewart'
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 Hart-Baldwin 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 = 'Hart-Baldwin'
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 West, Thomas and Rodriguez ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'West, Thomas and Rodriguez' ORDER BY price DESC
Natural Query: What is the total price of all products for Price-Parks?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Price-Parks'
Natural Query: What is the total sales for each country in Stephens Ltd?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Stephens Ltd' GROUP BY country ORDER BY total_sales DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lopez, Nguyen and Brooks 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 = 'Lopez, Nguyen and Brooks'
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 customers for Jones Ltd all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Jones Ltd' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10
Natural Query: List all products of Gordon-Hopkins ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Gordon-Hopkins' ORDER BY rating ASC
Natural Query: How many orders were placed for Wilson-Wilson between 2024-01-11 and 2024-01-22?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wilson-Wilson' AND order_date BETWEEN '2024-01-11' AND '2024-01-22'
Natural Query: How many orders were placed for Hill and Sons between 2024-02-09 and 2024-07-09?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hill and Sons' AND order_date BETWEEN '2024-02-09' AND '2024-07-09'
Natural Query: What are the top 10 products by orders for Schneider, Smith and Taylor this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Schneider, Smith and Taylor' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 10
Natural Query: What are the top 6 products by sales for Hurley, Cook and Rodriguez this year?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hurley, Cook and Rodriguez' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 6
Natural Query: What are the top 7 products by sales for Hodge PLC all time?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hodge PLC' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7