text
stringlengths
0
220
Natural Query: What is the total rating of all products for Miller, Henderson and Riggs?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Miller, Henderson and Riggs'
Natural Query: How many orders were placed for Davis-Cox between 2023-12-05 and 2024-03-19?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davis-Cox' AND order_date BETWEEN '2023-12-05' AND '2024-03-19'
Natural Query: How many orders were placed for Johnson LLC between 2023-12-11 and 2024-02-24?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson LLC' AND order_date BETWEEN '2023-12-11' AND '2024-02-24'
Natural Query: How many orders were placed for Turner LLC between 2024-01-29 and 2024-08-12?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Turner LLC' AND order_date BETWEEN '2024-01-29' AND '2024-08-12'
Natural Query: List all customers and their total order value for Davidson and Sons.
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 = 'Davidson and Sons' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Anderson PLC.
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 = 'Anderson PLC' GROUP BY c.customer_id
Natural Query: Show me all products in the free category with a price over $468.46.
SQL Query: SELECT * FROM products WHERE category = 'free' AND price > 468.46
Natural Query: What is the total profit for each country in Chaney Ltd?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Chaney Ltd' GROUP BY country ORDER BY total_profit DESC
Natural Query: List all customers and their total order value for Walker PLC.
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 = 'Walker PLC' GROUP BY c.customer_id
Natural Query: List all products of Mcdaniel Group ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Mcdaniel Group' ORDER BY rating ASC
Natural Query: Show me all products in the southern category with a price over $538.13.
SQL Query: SELECT * FROM products WHERE category = 'southern' AND price > 538.13
Natural Query: List all products of Adams Inc ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Adams Inc' ORDER BY stock_quantity ASC
Natural Query: How many orders were placed for Moore LLC between 2024-04-17 and 2024-04-20?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Moore LLC' AND order_date BETWEEN '2024-04-17' AND '2024-04-20'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Henry-Gibson 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 = 'Henry-Gibson'
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 Rodriguez, Moore and Moss.
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, Moore and Moss' GROUP BY c.customer_id
Natural Query: List all products of Montgomery, Mckay and Brooks ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Montgomery, Mckay and Brooks' ORDER BY price DESC
Natural Query: List all customers and their total order value for Johnson-White.
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 = 'Johnson-White' GROUP BY c.customer_id
Natural Query: List all products of Henry-Carson ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Henry-Carson' ORDER BY stock_quantity DESC
Natural Query: List all customers and their total order value for Harris, Norton and Price.
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 = 'Harris, Norton and Price' GROUP BY c.customer_id
Natural Query: List all products of Roberts-Hammond ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Roberts-Hammond' ORDER BY stock_quantity DESC
Natural Query: What are the top 8 products by revenue for Hill-Olson this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Hill-Olson' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 8
Natural Query: What is the maximum quantity of all products for Hicks-Lowe?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Hicks-Lowe'
Natural Query: What is the average rating of all products for Douglas, Caldwell and Williams?
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Douglas, Caldwell and Williams'
Natural Query: List all products of Johnson-Rios ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson-Rios' ORDER BY stock_quantity ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Martinez-Chase 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-Chase'
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 rating of all products for Gordon, Huff and Baldwin?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Gordon, Huff and Baldwin'
Natural Query: Show me all products in the this category with a price over $893.54.
SQL Query: SELECT * FROM products WHERE category = 'this' AND price > 893.54