text
stringlengths
0
220
Natural Query: List all products of Ryan Group ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Ryan Group' ORDER BY stock_quantity DESC
Natural Query: What is the total sales for each category in Thompson LLC?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Thompson LLC' GROUP BY category ORDER BY total_sales DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Kaiser, Moore and Miller 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 = 'Kaiser, Moore and Miller'
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 3 products by sales for Atkinson, Simpson and Harris last quarter?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Atkinson, Simpson and Harris' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3
Natural Query: What are the top 7 products by revenue for Walker-Harrison this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Walker-Harrison' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7
Natural Query: What is the total quantity for each supplier in Ellis-Bennett?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Ellis-Bennett' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Kelly, Henderson and Scott 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 = 'Kelly, Henderson and Scott'
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 Johnson, Harris and Richmond ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson, Harris and Richmond' ORDER BY price DESC
Natural Query: What is the maximum rating of all products for King Group?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'King Group'
Natural Query: What are the top 6 products by orders for Wilson, Jones and Kaufman this month?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Wilson, Jones and Kaufman' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6
Natural Query: How many orders were placed for Taylor-Garcia between 2023-09-24 and 2024-03-22?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Taylor-Garcia' AND order_date BETWEEN '2023-09-24' AND '2024-03-22'
Natural Query: List all products of Pierce, Warren and Cole ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Pierce, Warren and Cole' ORDER BY price ASC
Natural Query: Show me all products in the word category with a price over $802.94.
SQL Query: SELECT * FROM products WHERE category = 'word' AND price > 802.94
Natural Query: List all products of Schmidt, Frank and Hansen ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Schmidt, Frank and Hansen' ORDER BY stock_quantity DESC
Natural Query: List all products of Obrien, Koch and Franco ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Obrien, Koch and Franco' ORDER BY stock_quantity ASC
Natural Query: List all products of Kelley Inc ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Kelley Inc' ORDER BY rating DESC
Natural Query: List all products of Vincent, Anderson and Brown ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Vincent, Anderson and Brown' ORDER BY price DESC
Natural Query: How many orders were placed for Foster Group between 2023-09-30 and 2023-10-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Foster Group' AND order_date BETWEEN '2023-09-30' AND '2023-10-01'
Natural Query: What is the average quantity of all products for Lopez-Abbott?
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Lopez-Abbott'
Natural Query: What is the maximum price of all products for Zimmerman, Ramirez and Jones?
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Zimmerman, Ramirez and Jones'
Natural Query: List all customers and their total order value for Smith PLC.
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 = 'Smith PLC' GROUP BY c.customer_id
Natural Query: What is the total sales for each category in Gonzales and Sons?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Gonzales and Sons' GROUP BY category ORDER BY total_sales DESC
Natural Query: List all customers and their total order value for Phillips 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 = 'Phillips and Sons' GROUP BY c.customer_id
Natural Query: How many orders were placed for Rosario, Willis and Copeland between 2024-08-21 and 2024-09-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rosario, Willis and Copeland' AND order_date BETWEEN '2024-08-21' AND '2024-09-13'
Natural Query: List all customers and their total order value for Flores, Villarreal and Mason.
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 = 'Flores, Villarreal and Mason' GROUP BY c.customer_id
Natural Query: Show me all products in the option category with a price over $151.7.
SQL Query: SELECT * FROM products WHERE category = 'option' AND price > 151.7
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ramos Group for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s