text
stringlengths
0
220
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: What is the total quantity for each category in Smith, Sullivan and Rodgers?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Smith, Sullivan and Rodgers' GROUP BY category ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gonzalez 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 = 'Gonzalez Group'
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 Aguilar, Campbell and Williams ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Aguilar, Campbell and Williams' ORDER BY stock_quantity DESC
Natural Query: Show me all products in the training category with a price over $278.27.
SQL Query: SELECT * FROM products WHERE category = 'training' AND price > 278.27
Natural Query: List all customers and their total order value for Schneider Inc.
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 = 'Schneider Inc' GROUP BY c.customer_id
Natural Query: What are the top 4 products by customers for Jackson, Haynes and Phillips last quarter?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Jackson, Haynes and Phillips' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: List all customers and their total order value for Hughes 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 = 'Hughes and Sons' GROUP BY c.customer_id
Natural Query: What is the total quantity of all products for Sosa, Gomez and Lewis?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Sosa, Gomez and Lewis'
Natural Query: List all products of Davis-Rice ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Davis-Rice' ORDER BY price ASC
Natural Query: What are the top 8 products by orders for Bradley Inc this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Bradley Inc' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 8
Natural Query: List all products of Kidd, Khan and Arroyo ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Kidd, Khan and Arroyo' ORDER BY rating ASC
Natural Query: What is the total sales for each category in Johnson-Ford?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnson-Ford' GROUP BY category ORDER BY total_sales DESC
Natural Query: Show me all products in the build category with a price over $532.13.
SQL Query: SELECT * FROM products WHERE category = 'build' AND price > 532.13
Natural Query: List all customers and their total order value for Alvarez 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 = 'Alvarez Group' GROUP BY c.customer_id
Natural Query: Show me all products in the situation category with a price over $632.1.
SQL Query: SELECT * FROM products WHERE category = 'situation' AND price > 632.1
Natural Query: What is the total sales for each country in Alvarez-Smith?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Alvarez-Smith' GROUP BY country ORDER BY total_sales DESC
Natural Query: How many orders were placed for Ball Group between 2024-01-20 and 2024-08-21?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ball Group' AND order_date BETWEEN '2024-01-20' AND '2024-08-21'
Natural Query: List all customers and their total order value for Harrell, Anthony and Mendoza.
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 = 'Harrell, Anthony and Mendoza' GROUP BY c.customer_id
Natural Query: What are the top 10 products by revenue for Garza Group last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Garza Group' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10
Natural Query: What is the total rating of all products for Jones-Little?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Jones-Little'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Savage LLC 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 = 'Savage LLC'
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 products by revenue for Jacobs-Beck this month?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Jacobs-Beck' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5
Natural Query: What is the total rating of all products for Todd, Bishop and Diaz?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Todd, Bishop and Diaz'
Natural Query: How many orders were placed for Tran-Reid between 2023-11-28 and 2024-09-12?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Tran-Reid' AND order_date BETWEEN '2023-11-28' AND '2024-09-12'
Natural Query: What are the top 10 products by sales for Rogers and Sons last quarter?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Rogers and Sons' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 10
Natural Query: What is the total sales for each country in Wall PLC?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Wall PLC' GROUP BY country ORDER BY total_sales DESC