text
stringlengths
0
220
Natural Query: List all customers and their total order value for Villarreal 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 = 'Villarreal Ltd' GROUP BY c.customer_id
Natural Query: How many orders were placed for Johnson Group between 2023-09-21 and 2023-10-05?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson Group' AND order_date BETWEEN '2023-09-21' AND '2023-10-05'
Natural Query: List all products of Barnes, Flores and Robinson ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Barnes, Flores and Robinson' ORDER BY stock_quantity DESC
Natural Query: What are the top 3 products by revenue for Tucker PLC this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Tucker PLC' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3
Natural Query: Show me all products in the write category with a price over $881.94.
SQL Query: SELECT * FROM products WHERE category = 'write' AND price > 881.94
Natural Query: What is the total profit for each category in Edwards LLC?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Edwards LLC' GROUP BY category ORDER BY total_profit DESC
Natural Query: List all products of Hodge, Morris and Bailey ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Hodge, Morris and Bailey' ORDER BY stock_quantity ASC
Natural Query: What is the total profit for each country in Jones, Guerra and Blake?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Jones, Guerra and Blake' GROUP BY country ORDER BY total_profit DESC
Natural Query: List all customers and their total order value for Hester-Andrews.
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 = 'Hester-Andrews' GROUP BY c.customer_id
Natural Query: What is the total quantity of all products for Hester and Sons?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Hester and Sons'
Natural Query: What is the total quantity of all products for Hobbs, Vazquez and Scott?
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Hobbs, Vazquez and Scott'
Natural Query: List all customers and their total order value for Holmes, Lewis and Delgado.
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 = 'Holmes, Lewis and Delgado' GROUP BY c.customer_id
Natural Query: How many orders were placed for Rollins LLC between 2024-05-16 and 2024-06-07?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rollins LLC' AND order_date BETWEEN '2024-05-16' AND '2024-06-07'
Natural Query: Show me all products in the something category with a price over $646.92.
SQL Query: SELECT * FROM products WHERE category = 'something' AND price > 646.92
Natural Query: What is the total price of all products for Smith, Boyd and Hill?
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Smith, Boyd and Hill'
Natural Query: What is the total profit for each category in Nelson-Morgan?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Nelson-Morgan' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the total sales for each country in Hensley, Gordon and Wade?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hensley, Gordon and Wade' GROUP BY country ORDER BY total_sales DESC
Natural Query: Show me all products in the would category with a price over $419.37.
SQL Query: SELECT * FROM products WHERE category = 'would' AND price > 419.37
Natural Query: List all customers and their total order value for Blevins 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 = 'Blevins LLC' GROUP BY c.customer_id
Natural Query: What is the maximum price of all products for Richards, Flowers and Martinez?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Richards, Flowers and Martinez'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Sullivan and Sons 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 = 'Sullivan and Sons'
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 Martinez Group ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Martinez Group' ORDER BY rating ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Harris-Baker 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 = 'Harris-Baker'
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 Thornton, Duncan and Bradley between 2024-08-25 and 2024-08-29?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thornton, Duncan and Bradley' AND order_date BETWEEN '2024-08-25' AND '2024-08-29'
Natural Query: How many orders were placed for Watkins, Andrews and Stewart between 2024-01-13 and 2024-06-10?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Watkins, Andrews and Stewart' AND order_date BETWEEN '2024-01-13' AND '2024-06-10'
Natural Query: Show me all products in the week category with a price over $740.84.
SQL Query: SELECT * FROM products WHERE category = 'week' AND price > 740.84
Natural Query: What is the total sales for each category in Lamb Inc?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Lamb Inc' GROUP BY category ORDER BY total_sales DESC