text
stringlengths
0
220
Natural Query: What is the total profit for each supplier in Wilkerson and Sons?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Wilkerson and Sons' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Kirby Inc 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 = 'Kirby Inc'
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 categories by sales for customers aged 25-35 in Best 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 = 'Best 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: How many orders were placed for Jones Inc between 2024-08-25 and 2024-09-02?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jones Inc' AND order_date BETWEEN '2024-08-25' AND '2024-09-02'
Natural Query: List all customers and their total order value for Franklin, Turner and Kim.
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 = 'Franklin, Turner and Kim' GROUP BY c.customer_id
Natural Query: How many orders were placed for Huber LLC between 2024-09-04 and 2024-09-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Huber LLC' AND order_date BETWEEN '2024-09-04' AND '2024-09-13'
Natural Query: How many orders were placed for Alexander-Johnston between 2024-04-03 and 2024-08-06?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Alexander-Johnston' AND order_date BETWEEN '2024-04-03' AND '2024-08-06'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Johnson, Gilbert and Carter 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 = 'Johnson, Gilbert and Carter'
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 average price of all products for Mendoza Inc?
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Mendoza Inc'
Natural Query: What is the maximum quantity of all products for Gomez, Duffy and Gay?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Gomez, Duffy and Gay'
Natural Query: List all products of Weiss, Wu and Jennings ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Weiss, Wu and Jennings' ORDER BY price DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Parsons 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 = 'Parsons LLC'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: Show me all products in the development category with a price over $510.21.
SQL Query: SELECT * FROM products WHERE category = 'development' AND price > 510.21
Natural Query: Show me all products in the stuff category with a price over $368.45.
SQL Query: SELECT * FROM products WHERE category = 'stuff' AND price > 368.45
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Carr Inc 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 = 'Carr Inc'
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 categories by sales for customers aged 25-35 in Jones, Wu and Washington 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 = 'Jones, Wu and Washington'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC