text
stringlengths
0
220
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Marquez LLC' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7
Natural Query: List all customers and their total order value for Tucker 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 = 'Tucker Ltd' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Terrell-Thompson.
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 = 'Terrell-Thompson' GROUP BY c.customer_id
Natural Query: What is the maximum rating of all products for Bailey Inc?
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Bailey Inc'
Natural Query: How many orders were placed for Johnson LLC between 2024-05-12 and 2024-05-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson LLC' AND order_date BETWEEN '2024-05-12' AND '2024-05-14'
Natural Query: What is the minimum price of all products for Stewart, Thomas and Montgomery?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Stewart, Thomas and Montgomery'
Natural Query: What is the total quantity for each supplier in Ortiz-Smith?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Ortiz-Smith' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: How many orders were placed for Wilkinson, Smith and Mack between 2023-11-15 and 2023-12-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wilkinson, Smith and Mack' AND order_date BETWEEN '2023-11-15' AND '2023-12-13'
Natural Query: List all products of Morrison-Ho ordered by price from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Morrison-Ho' ORDER BY price DESC
Natural Query: List all customers and their total order value for Garcia, Maynard and Patton.
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 = 'Garcia, Maynard and Patton' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Greene-Macias 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 = 'Greene-Macias'
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 Willis, Villegas and Proctor ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Willis, Villegas and Proctor' ORDER BY rating ASC
Natural Query: List all products of Reeves-Taylor ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Reeves-Taylor' ORDER BY rating ASC
Natural Query: What are the top 4 products by customers for Nixon-Munoz this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Nixon-Munoz' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: What is the minimum price of all products for White, Kline and Cruz?
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'White, Kline and Cruz'
Natural Query: What is the minimum quantity of all products for Johnson, Elliott and Herrera?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Johnson, Elliott and Herrera'
Natural Query: List all products of Green, Quinn and Peterson ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Green, Quinn and Peterson' ORDER BY price ASC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Myers, Walker and Matthews 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 = 'Myers, Walker and Matthews'
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 quantity for each country in Schmidt, Villa and Jones?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Schmidt, Villa and Jones' GROUP BY country ORDER BY total_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Armstrong 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 = 'Armstrong 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 profit for each category in Campbell PLC?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Campbell PLC' GROUP BY category ORDER BY total_profit DESC
Natural Query: What is the average price of all products for Hamilton-Perez?
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Hamilton-Perez'
Natural Query: List all products of Collins, Bailey and Banks ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Collins, Bailey and Banks' ORDER BY rating ASC
Natural Query: What are the top 8 products by sales for Gonzalez-Richardson this year?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Gonzalez-Richardson' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8
Natural Query: What is the minimum rating of all products for Larsen-Phillips?
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Larsen-Phillips'