text stringlengths 0 220 |
|---|
LIMIT 5 |
Natural Query: How many orders were placed for Mercado-Kemp between 2023-11-08 and 2023-12-25? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mercado-Kemp' AND order_date BETWEEN '2023-11-08' AND '2023-12-25' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Garcia, Farley and Smith 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 = 'Garcia, Farley and Smith' |
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 5 categories by sales for customers aged 25-35 in Doyle 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 = 'Doyle 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 5 categories by sales for customers aged 25-35 in Powers 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 = 'Powers Group' |
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 Mr category with a price over $501.65. |
SQL Query: SELECT * FROM products WHERE category = 'Mr' AND price > 501.65 |
Natural Query: What are the top 5 products by sales for Martinez, Holmes and Dennis this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Martinez, Holmes and Dennis' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 5 |
Natural Query: List all products of West-Sullivan ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'West-Sullivan' ORDER BY price ASC |
Natural Query: Show me all products in the act category with a price over $324.71. |
SQL Query: SELECT * FROM products WHERE category = 'act' AND price > 324.71 |
Natural Query: List all products of Smith, Burns and Schroeder ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Smith, Burns and Schroeder' ORDER BY stock_quantity DESC |
Natural Query: List all products of Walker, Reyes and Curtis ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Walker, Reyes and Curtis' ORDER BY rating DESC |
Natural Query: What is the minimum quantity of all products for Le LLC? |
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Le LLC' |
Natural Query: How many orders were placed for Phillips, Hess and Ramirez between 2023-10-09 and 2024-01-25? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Phillips, Hess and Ramirez' AND order_date BETWEEN '2023-10-09' AND '2024-01-25' |
Natural Query: How many orders were placed for Garcia LLC between 2023-09-27 and 2024-01-24? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Garcia LLC' AND order_date BETWEEN '2023-09-27' AND '2024-01-24' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Knight, Brown and Warren 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 = 'Knight, Brown and Warren' |
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 Martin Ltd last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Martin Ltd' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7 |
Natural Query: What is the total profit for each country in Townsend and Sons? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Townsend and Sons' GROUP BY country ORDER BY total_profit DESC |
Natural Query: How many orders were placed for Fields-Austin between 2024-08-11 and 2024-08-23? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Fields-Austin' AND order_date BETWEEN '2024-08-11' AND '2024-08-23' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Braun LLC 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 = 'Braun LLC' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.