text
stringlengths
0
220
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Stokes PLC'
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 price of all products for Sherman, Wilson and Chan?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Sherman, Wilson and Chan'
Natural Query: List all customers and their total order value for Maxwell, Villa and Brooks.
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 = 'Maxwell, Villa and Brooks' GROUP BY c.customer_id
Natural Query: What is the total sales for each category in Horton-Blackwell?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Horton-Blackwell' GROUP BY category ORDER BY total_sales DESC
Natural Query: How many orders were placed for Taylor-Greer between 2024-05-15 and 2024-07-26?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Taylor-Greer' AND order_date BETWEEN '2024-05-15' AND '2024-07-26'
Natural Query: List all customers and their total order value for Nguyen-Douglas.
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 = 'Nguyen-Douglas' GROUP BY c.customer_id
Natural Query: What is the total quantity for each country in Davis and Sons?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Davis and Sons' GROUP BY country ORDER BY total_quantity DESC
Natural Query: What are the top 4 products by sales for Paul Ltd this year?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Paul Ltd' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 4
Natural Query: Show me all products in the still category with a price over $54.68.
SQL Query: SELECT * FROM products WHERE category = 'still' AND price > 54.68
Natural Query: List all customers and their total order value for Hines 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 = 'Hines Inc' GROUP BY c.customer_id
Natural Query: What are the top 4 products by orders for Ortiz-Patterson all time?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Ortiz-Patterson' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4
Natural Query: List all customers and their total order value for Simmons-Wu.
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 = 'Simmons-Wu' GROUP BY c.customer_id
Natural Query: What is the average quantity of all products for Schmidt Group?
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Schmidt Group'
Natural Query: Show me all products in the vote category with a price over $907.84.
SQL Query: SELECT * FROM products WHERE category = 'vote' AND price > 907.84
Natural Query: What is the total sales for each country in Jackson, Walters and Miller?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Jackson, Walters and Miller' GROUP BY country ORDER BY total_sales DESC
Natural Query: What is the total sales for each supplier in Martin-Williams?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Martin-Williams' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: How many orders were placed for Cole-Ellison between 2024-05-02 and 2024-06-16?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cole-Ellison' AND order_date BETWEEN '2024-05-02' AND '2024-06-16'
Natural Query: List all products of Jenkins Inc ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Jenkins Inc' ORDER BY stock_quantity DESC
Natural Query: List all customers and their total order value for Delacruz 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 = 'Delacruz Ltd' GROUP BY c.customer_id
Natural Query: Show me all products in the question category with a price over $606.29.
SQL Query: SELECT * FROM products WHERE category = 'question' AND price > 606.29
Natural Query: What is the total sales for each category in Jones, Harris and Webb?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Jones, Harris and Webb' GROUP BY category ORDER BY total_sales DESC
Natural Query: List all products of Castillo-Cole ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Castillo-Cole' ORDER BY price DESC
Natural Query: How many orders were placed for Lewis-Wilson between 2024-07-14 and 2024-07-16?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lewis-Wilson' AND order_date BETWEEN '2024-07-14' AND '2024-07-16'
Natural Query: What is the total profit for each category in Hanna, Williams and Baldwin?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Hanna, Williams and Baldwin' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the maximum quantity of all products for Elliott PLC?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Elliott PLC'
Natural Query: What is the minimum rating of all products for Skinner-Wheeler?
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Skinner-Wheeler'
Natural Query: List all products of Nelson-Stone ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Nelson-Stone' ORDER BY stock_quantity ASC
Natural Query: How many orders were placed for Wang, Nicholson and Boyd between 2024-08-22 and 2024-09-15?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wang, Nicholson and Boyd' AND order_date BETWEEN '2024-08-22' AND '2024-09-15'
Natural Query: List all products of Thomas, Shaffer and Shaw ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Thomas, Shaffer and Shaw' ORDER BY price ASC
Natural Query: List all customers and their total order value for Valdez 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 = 'Valdez Inc' GROUP BY c.customer_id
Natural Query: What are the top 3 products by sales for Acosta, Pacheco and Atkinson this year?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Acosta, Pacheco and Atkinson' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Brown Ltd for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s