text stringlengths 0 220 |
|---|
WHERE c.age BETWEEN 25 AND 35 |
AND s.company_name = 'Adams-Garcia' |
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 supplier in Mills, Martinez and Graham? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Mills, Martinez and Graham' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: How many orders were placed for Jenkins-Smith between 2024-05-31 and 2024-07-31? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jenkins-Smith' AND order_date BETWEEN '2024-05-31' AND '2024-07-31' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Brown, Owen and Bonilla 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 = 'Brown, Owen and Bonilla' |
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 Chen, Cox 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 = 'Chen, Cox 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 9 products by customers for Roberts, Reese and Cox this month? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Roberts, Reese and Cox' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Stewart-Thomas 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 = 'Stewart-Thomas' |
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 customers for Gutierrez, Bryan and Gray last quarter? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Gutierrez, Bryan and Gray' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lawrence-West 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 = 'Lawrence-West' |
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 maximum rating of all products for Holmes, Newton and Coleman? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Holmes, Newton and Coleman' |
Natural Query: How many orders were placed for Marshall-Morales between 2024-04-06 and 2024-08-03? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Marshall-Morales' AND order_date BETWEEN '2024-04-06' AND '2024-08-03' |
Natural Query: What is the total price of all products for Ramirez, Sanchez and Baker? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Ramirez, Sanchez and Baker' |
Natural Query: Show me all products in the American category with a price over $65.27. |
SQL Query: SELECT * FROM products WHERE category = 'American' AND price > 65.27 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in York, Perez and Hensley 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 = 'York, Perez and Hensley' |
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 country in Rowland LLC? |
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Rowland LLC' GROUP BY country ORDER BY total_sales DESC |
Natural Query: What is the total sales for each category in Nolan PLC? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Nolan PLC' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Townsend LLC for the last quarter? |
SQL Query: SELECT p.category, SUM(s.sales) as total_sales |
FROM sales s |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.