text
stringlengths
0
220
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Smith, Davenport and Green' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 8
Natural Query: What are the top 3 products by sales for Simmons, Brown and Howard last quarter?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Simmons, Brown and Howard' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3
Natural Query: How many orders were placed for Jones, Meyer and Jones between 2024-03-10 and 2024-06-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jones, Meyer and Jones' AND order_date BETWEEN '2024-03-10' AND '2024-06-01'
Natural Query: Show me all products in the glass category with a price over $602.0.
SQL Query: SELECT * FROM products WHERE category = 'glass' AND price > 602.0
Natural Query: What is the minimum quantity of all products for Nguyen, Clark and Bruce?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Nguyen, Clark and Bruce'
Natural Query: List all customers and their total order value for Jensen Ltd.
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 = 'Jensen Ltd' GROUP BY c.customer_id
Natural Query: Show me all products in the relationship category with a price over $472.06.
SQL Query: SELECT * FROM products WHERE category = 'relationship' AND price > 472.06
Natural Query: How many orders were placed for Moore, Greene and Holmes between 2023-12-03 and 2024-04-26?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Moore, Greene and Holmes' AND order_date BETWEEN '2023-12-03' AND '2024-04-26'
Natural Query: What is the total profit for each category in Butler-Adams?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Butler-Adams' GROUP BY category ORDER BY total_profit DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mcclain-Herman 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 = 'Mcclain-Herman'
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 total quantity for each country in Bailey PLC?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Bailey PLC' GROUP BY country ORDER BY total_quantity DESC
Natural Query: List all products of Mccall, Miller and Bryant ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Mccall, Miller and Bryant' ORDER BY stock_quantity ASC
Natural Query: How many orders were placed for Carter, Hendrix and Bailey between 2024-08-18 and 2024-09-04?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Carter, Hendrix and Bailey' AND order_date BETWEEN '2024-08-18' AND '2024-09-04'
Natural Query: How many orders were placed for Davis-Warner between 2024-07-11 and 2024-07-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davis-Warner' AND order_date BETWEEN '2024-07-11' AND '2024-07-13'
Natural Query: List all products of Lindsey-Ortiz ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Lindsey-Ortiz' ORDER BY price DESC
Natural Query: Show me all products in the reduce category with a price over $237.54.
SQL Query: SELECT * FROM products WHERE category = 'reduce' AND price > 237.54
Natural Query: What is the total rating of all products for Evans-Ball?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Evans-Ball'
Natural Query: List all products of Williams Inc ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Williams Inc' ORDER BY stock_quantity ASC
Natural Query: What are the top 6 products by customers for Ward-Tucker this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Ward-Tucker' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 6
Natural Query: List all products of Lam-Jones ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Lam-Jones' ORDER BY price DESC
Natural Query: What is the minimum quantity of all products for Nelson-Rodriguez?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Nelson-Rodriguez'
Natural Query: What are the top 3 products by sales for Carter-Gamble this month?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Carter-Gamble' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3
Natural Query: What is the total quantity for each country in Conway-Bauer?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Conway-Bauer' GROUP BY country ORDER BY total_quantity DESC
Natural Query: List all products of Williams-Newton ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Williams-Newton' ORDER BY price ASC
Natural Query: What is the total sales for each category in Simmons, Hawkins and Singh?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Simmons, Hawkins and Singh' GROUP BY category ORDER BY total_sales DESC
Natural Query: What is the total sales for each category in Jacobs Group?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Jacobs Group' GROUP BY category ORDER BY total_sales DESC
Natural Query: Show me all products in the direction category with a price over $94.02.
SQL Query: SELECT * FROM products WHERE category = 'direction' AND price > 94.02
Natural Query: What is the total sales for each supplier in Tate-Stevens?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Tate-Stevens' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: What is the maximum price of all products for Rose, Cooper and Huerta?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Rose, Cooper and Huerta'
Natural Query: What is the total rating of all products for Saunders-Davidson?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Saunders-Davidson'
Natural Query: What are the top 9 products by customers for Perez-Logan all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Perez-Logan' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9