text
stringlengths
0
220
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 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: Show me all products in the part category with a price over $981.78.
SQL Query: SELECT * FROM products WHERE category = 'part' AND price > 981.78
Natural Query: List all products of Smith Inc ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Smith Inc' ORDER BY stock_quantity ASC
Natural Query: What is the total rating of all products for Hansen PLC?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Hansen PLC'
Natural Query: List all products of Simmons Group ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Simmons Group' ORDER BY rating DESC
Natural Query: What is the maximum rating of all products for Bates-Hunter?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Bates-Hunter'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Davis 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 = 'Davis Inc'
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 Bell-Cunningham between 2024-04-14 and 2024-09-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Bell-Cunningham' AND order_date BETWEEN '2024-04-14' AND '2024-09-01'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Scott PLC 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 = 'Scott PLC'
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 Pace Inc between 2024-05-25 and 2024-07-16?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Pace Inc' AND order_date BETWEEN '2024-05-25' AND '2024-07-16'
Natural Query: How many orders were placed for Ferguson, Osborne and Bailey between 2024-07-15 and 2024-09-02?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ferguson, Osborne and Bailey' AND order_date BETWEEN '2024-07-15' AND '2024-09-02'
Natural Query: How many orders were placed for Gonzalez-Rodriguez between 2024-02-04 and 2024-08-26?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gonzalez-Rodriguez' AND order_date BETWEEN '2024-02-04' AND '2024-08-26'
Natural Query: Show me all products in the today category with a price over $60.58.
SQL Query: SELECT * FROM products WHERE category = 'today' AND price > 60.58
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Li-Jenkins 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 = 'Li-Jenkins'
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 including category with a price over $703.99.
SQL Query: SELECT * FROM products WHERE category = 'including' AND price > 703.99
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Allen, Osborne and Hays 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 = 'Allen, Osborne and Hays'
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 6 products by customers for Perez-Castillo this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Perez-Castillo' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 6
Natural Query: Show me all products in the carry category with a price over $346.67.
SQL Query: SELECT * FROM products WHERE category = 'carry' AND price > 346.67
Natural Query: What are the top 9 products by orders for Carr, Martin and Robinson this year?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Carr, Martin and Robinson' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 9
Natural Query: What is the minimum price of all products for Medina-Barnes?