text
stringlengths
0
220
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gomez Inc' AND order_date BETWEEN '2024-06-18' AND '2024-09-14'
Natural Query: How many orders were placed for Jordan, Ross and Wagner between 2024-07-08 and 2024-08-16?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jordan, Ross and Wagner' AND order_date BETWEEN '2024-07-08' AND '2024-08-16'
Natural Query: Show me all products in the appear category with a price over $390.98.
SQL Query: SELECT * FROM products WHERE category = 'appear' AND price > 390.98
Natural Query: List all customers and their total order value for Hurley-Bradley.
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 = 'Hurley-Bradley' GROUP BY c.customer_id
Natural Query: What is the maximum quantity of all products for King, Miller and Higgins?
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'King, Miller and Higgins'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Tapia 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 = 'Tapia 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 are the top 7 products by sales for Walker and Sons last quarter?
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Walker and Sons' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7
Natural Query: How many orders were placed for Garcia and Sons between 2023-10-25 and 2024-05-30?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Garcia and Sons' AND order_date BETWEEN '2023-10-25' AND '2024-05-30'
Natural Query: What is the total quantity for each country in Nunez PLC?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Nunez PLC' GROUP BY country ORDER BY total_quantity DESC
Natural Query: List all customers and their total order value for Sanchez, Wells and Burke.
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 = 'Sanchez, Wells and Burke' GROUP BY c.customer_id
Natural Query: Show me all products in the try category with a price over $556.23.
SQL Query: SELECT * FROM products WHERE category = 'try' AND price > 556.23
Natural Query: What are the top 3 products by customers for Porter-Lane this month?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Porter-Lane' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 3
Natural Query: Show me all products in the if category with a price over $138.13.
SQL Query: SELECT * FROM products WHERE category = 'if' AND price > 138.13
Natural Query: List all products of Williams, Jones and Lee ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Williams, Jones and Lee' ORDER BY stock_quantity DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Carroll, Arnold and Garcia 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 = 'Carroll, Arnold and Garcia'
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 born category with a price over $817.49.
SQL Query: SELECT * FROM products WHERE category = 'born' AND price > 817.49
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in English, Parker and Parker 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 = 'English, Parker and Parker'
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 PLC ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson PLC' ORDER BY rating ASC
Natural Query: What are the top 9 products by customers for Johnston Group all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Johnston Group' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9
Natural Query: What are the top 10 products by customers for Ross Ltd last quarter?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Ross Ltd' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10
Natural Query: Show me all products in the wind category with a price over $647.36.
SQL Query: SELECT * FROM products WHERE category = 'wind' AND price > 647.36
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Thompson-Sexton 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 = 'Thompson-Sexton'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5