text
stringlengths
0
220
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Raymond-Calhoun 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 = 'Raymond-Calhoun'
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 Carter, Ponce and Smith between 2024-06-05 and 2024-07-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Carter, Ponce and Smith' AND order_date BETWEEN '2024-06-05' AND '2024-07-01'
Natural Query: What are the top 9 products by revenue for Marsh, Rogers and Reynolds this month?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Marsh, Rogers and Reynolds' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 9
Natural Query: List all products of Burton, Delgado and Mccoy ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Burton, Delgado and Mccoy' ORDER BY stock_quantity DESC
Natural Query: How many orders were placed for Dean LLC between 2024-01-15 and 2024-09-01?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Dean LLC' AND order_date BETWEEN '2024-01-15' AND '2024-09-01'
Natural Query: What is the minimum quantity of all products for Clark, Browning and Gilbert?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Clark, Browning and Gilbert'
Natural Query: List all products of Martin-Smith ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Martin-Smith' ORDER BY rating ASC
Natural Query: What is the maximum rating of all products for Hayes-Wolfe?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Hayes-Wolfe'
Natural Query: What are the top 9 products by orders for Graham, Benson and Shelton last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Graham, Benson and Shelton' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 9
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ballard Ltd 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 = 'Ballard Ltd'
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 sales for each category in Moore, Goodwin and Davis?
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Moore, Goodwin and Davis' GROUP BY category ORDER BY total_sales DESC
Natural Query: List all products of Cowan-Brown ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Cowan-Brown' ORDER BY price DESC
Natural Query: What is the total quantity for each category in Bishop-Wilson?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Bishop-Wilson' GROUP BY category ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Moreno, Rivera and Brock 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 = 'Moreno, Rivera and Brock'
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 7 products by revenue for Mason-Graham this month?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Mason-Graham' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7
Natural Query: Show me all products in the individual category with a price over $276.62.
SQL Query: SELECT * FROM products WHERE category = 'individual' AND price > 276.62
Natural Query: What are the top 10 products by orders for Nelson Group last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Nelson Group' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 10
Natural Query: What is the total sales for each supplier in Ashley and Sons?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Ashley and Sons' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: List all customers and their total order value for Austin 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 = 'Austin PLC' GROUP BY c.customer_id
Natural Query: What is the minimum rating of all products for Warner PLC?
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Warner PLC'
Natural Query: List all products of Wilson, Bender and Lopez ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Wilson, Bender and Lopez' ORDER BY rating ASC
Natural Query: List all products of Avila, Hensley and Thomas ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Avila, Hensley and Thomas' ORDER BY price ASC
Natural Query: List all products of Smith LLC ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Smith LLC' ORDER BY rating ASC
Natural Query: Show me all products in the than category with a price over $16.4.
SQL Query: SELECT * FROM products WHERE category = 'than' AND price > 16.4
Natural Query: What is the maximum rating of all products for Lowe, Newman and Grant?