text
stringlengths
0
220
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Schroeder-Gonzalez' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What is the maximum rating of all products for Watson-Cole?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Watson-Cole'
Natural Query: List all customers and their total order value for Beasley, Bender and Parks.
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 = 'Beasley, Bender and Parks' GROUP BY c.customer_id
Natural Query: What are the top 6 products by orders for Clark LLC last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Clark LLC' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6
Natural Query: List all customers and their total order value for Curtis-Peterson.
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 = 'Curtis-Peterson' GROUP BY c.customer_id
Natural Query: What is the total profit for each category in Daniels, Davis and Gonzalez?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Daniels, Davis and Gonzalez' GROUP BY category ORDER BY total_profit DESC
Natural Query: What are the top 9 products by sales for Rodriguez Inc last quarter?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Rodriguez Inc' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 9
Natural Query: What is the total profit for each category in Miller-Rogers?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Miller-Rogers' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the minimum price of all products for Marquez Group?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Marquez Group'
Natural Query: Show me all products in the charge category with a price over $543.31.
SQL Query: SELECT * FROM products WHERE category = 'charge' AND price > 543.31
Natural Query: What is the total sales for each country in Bell and Sons?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Bell and Sons' GROUP BY country ORDER BY total_sales DESC
Natural Query: What are the top 4 products by orders for Watson-Hines last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Watson-Hines' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4
Natural Query: List all products of Willis, Lawrence and Rich ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Willis, Lawrence and Rich' ORDER BY stock_quantity ASC
Natural Query: List all customers and their total order value for Newton 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 = 'Newton Inc' GROUP BY c.customer_id
Natural Query: What are the top 4 products by orders for Dawson, Saunders and Benson this year?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Dawson, Saunders and Benson' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4
Natural Query: List all customers and their total order value for Baker-Smith.
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 = 'Baker-Smith' GROUP BY c.customer_id
Natural Query: How many orders were placed for Lawrence and Sons between 2024-06-11 and 2024-09-09?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lawrence and Sons' AND order_date BETWEEN '2024-06-11' AND '2024-09-09'
Natural Query: What are the top 5 products by revenue for Hanna, Johnson and Cole last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Hanna, Johnson and Cole' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5
Natural Query: What is the maximum quantity of all products for Morrison-Watkins?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Morrison-Watkins'
Natural Query: What are the top 4 products by revenue for Garcia, Robinson and Garcia last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Garcia, Robinson and Garcia' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 4
Natural Query: List all customers and their total order value for Mcguire, Williams and Gonzalez.
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 = 'Mcguire, Williams and Gonzalez' GROUP BY c.customer_id
Natural Query: What is the total quantity for each supplier in Vasquez, Chavez and Swanson?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Vasquez, Chavez and Swanson' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lee Ltd 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 = 'Lee Ltd'
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 Davidson-Jacobs?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Davidson-Jacobs' GROUP BY country ORDER BY total_quantity DESC
Natural Query: Show me all products in the surface category with a price over $221.57.
SQL Query: SELECT * FROM products WHERE category = 'surface' AND price > 221.57
Natural Query: What are the top 10 products by revenue for Johnston, Carter and Nunez last quarter?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Johnston, Carter and Nunez' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10
Natural Query: How many orders were placed for Mann Inc between 2024-04-04 and 2024-06-23?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mann Inc' AND order_date BETWEEN '2024-04-04' AND '2024-06-23'
Natural Query: List all customers and their total order value for Benson, Collins and Calhoun.
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 = 'Benson, Collins and Calhoun' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Taylor, Stafford and Schmitt 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 = 'Taylor, Stafford and Schmitt'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)