text
stringlengths
0
220
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Le-Lee' GROUP BY country ORDER BY total_sales DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Carter Group 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 = 'Carter Group'
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 customers and their total order value for Hahn-Snyder.
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 = 'Hahn-Snyder' GROUP BY c.customer_id
Natural Query: How many orders were placed for Braun PLC between 2024-06-07 and 2024-07-25?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Braun PLC' AND order_date BETWEEN '2024-06-07' AND '2024-07-25'
Natural Query: List all products of Davis Ltd ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Davis Ltd' ORDER BY rating ASC
Natural Query: List all customers and their total order value for Washington, Hernandez and Richard.
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 = 'Washington, Hernandez and Richard' GROUP BY c.customer_id
Natural Query: How many orders were placed for Allen-Larsen between 2024-08-25 and 2024-08-26?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Allen-Larsen' AND order_date BETWEEN '2024-08-25' AND '2024-08-26'
Natural Query: What are the top 6 products by customers for Poole Ltd all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Poole Ltd' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 6
Natural Query: What is the total sales for each country in Logan, Villanueva and Clark?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Logan, Villanueva and Clark' GROUP BY country ORDER BY total_sales DESC
Natural Query: How many orders were placed for Lee-Stewart between 2024-06-28 and 2024-08-10?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lee-Stewart' AND order_date BETWEEN '2024-06-28' AND '2024-08-10'
Natural Query: List all customers and their total order value for Thomas-Aguilar.
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 = 'Thomas-Aguilar' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Lewis, Higgins and Bailey.
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 = 'Lewis, Higgins and Bailey' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Friedman, Gallagher and Downs.
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 = 'Friedman, Gallagher and Downs' GROUP BY c.customer_id
Natural Query: Show me all products in the week category with a price over $132.66.
SQL Query: SELECT * FROM products WHERE category = 'week' AND price > 132.66
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Anderson, Cummings and Koch 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 = 'Anderson, Cummings and Koch'
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 Ayers, Lewis and Barrett between 2023-12-17 and 2024-03-28?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ayers, Lewis and Barrett' AND order_date BETWEEN '2023-12-17' AND '2024-03-28'
Natural Query: How many orders were placed for Thomas, Berger and Mejia between 2024-06-06 and 2024-09-14?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thomas, Berger and Mejia' AND order_date BETWEEN '2024-06-06' AND '2024-09-14'
Natural Query: Show me all products in the real category with a price over $494.66.
SQL Query: SELECT * FROM products WHERE category = 'real' AND price > 494.66
Natural Query: List all products of Kerr-Hayes ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Kerr-Hayes' ORDER BY price ASC
Natural Query: What are the top 5 products by customers for Smith, Smith and Newton last quarter?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Smith, Smith and Newton' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5
Natural Query: Show me all products in the bit category with a price over $605.83.
SQL Query: SELECT * FROM products WHERE category = 'bit' AND price > 605.83
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Thornton, Clark and Jimenez 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 = 'Thornton, Clark and Jimenez'
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 customers and their total order value for Nguyen 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 = 'Nguyen Ltd' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Pacheco and Sons.
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 = 'Pacheco and Sons' GROUP BY c.customer_id
Natural Query: List all products of Snyder, Nelson and Graham ordered by stock_quantity from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Snyder, Nelson and Graham' ORDER BY stock_quantity ASC