text
stringlengths
0
220
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: List all products of Martin Ltd ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Martin Ltd' ORDER BY price DESC
Natural Query: What is the total rating of all products for Burns-Nguyen?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Burns-Nguyen'
Natural Query: What is the minimum quantity of all products for Brown, Doyle and Lee?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Brown, Doyle and Lee'
Natural Query: What is the total quantity for each supplier in Castillo, Thomas and Moss?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Castillo, Thomas and Moss' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: List all products of Li, Welch and Kidd ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Li, Welch and Kidd' ORDER BY price DESC
Natural Query: Show me all products in the high category with a price over $122.91.
SQL Query: SELECT * FROM products WHERE category = 'high' AND price > 122.91
Natural Query: List all customers and their total order value for Hernandez 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 = 'Hernandez LLC' GROUP BY c.customer_id
Natural Query: List all products of Carter LLC ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Carter LLC' ORDER BY rating DESC
Natural Query: List all products of Woodard-Owens ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Woodard-Owens' ORDER BY rating DESC
Natural Query: What is the total profit for each supplier in Mcdonald LLC?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Mcdonald LLC' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What is the total sales for each category in Freeman, Wolf and Garcia?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Freeman, Wolf and Garcia' GROUP BY category ORDER BY total_sales DESC
Natural Query: What is the average rating of all products for Weber-Holloway?
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Weber-Holloway'
Natural Query: List all products of Wright Inc ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Wright Inc' ORDER BY price DESC
Natural Query: What is the minimum price of all products for Bell-Thomas?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Bell-Thomas'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hernandez Group 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 = 'Hernandez Group'
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 Hayes Group between 2024-08-23 and 2024-08-29?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hayes Group' AND order_date BETWEEN '2024-08-23' AND '2024-08-29'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Carey-Aguilar 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 = 'Carey-Aguilar'
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 friend category with a price over $629.73.
SQL Query: SELECT * FROM products WHERE category = 'friend' AND price > 629.73
Natural Query: What is the total quantity of all products for Baker Inc?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Baker Inc'
Natural Query: Show me all products in the nature category with a price over $965.37.
SQL Query: SELECT * FROM products WHERE category = 'nature' AND price > 965.37
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Miller-Morris 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-Morris'
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 Simmons LLC ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Simmons LLC' ORDER BY rating ASC
Natural Query: What are the top 3 products by orders for Lin, Ross and Rose this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Lin, Ross and Rose' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 3