text stringlengths 0 220 |
|---|
Natural Query: What are the top 6 products by revenue for Clark Inc all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Clark Inc' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6 |
Natural Query: Show me all products in the him category with a price over $978.02. |
SQL Query: SELECT * FROM products WHERE category = 'him' AND price > 978.02 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Romero Inc 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 = 'Romero Inc' |
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 of all products for Lane, Jones and Bryant? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Lane, Jones and Bryant' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Cole-Wallace 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 = 'Cole-Wallace' |
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 category in Smith-Crosby? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Smith-Crosby' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ellison Inc 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 = 'Ellison Inc' |
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 minimum price of all products for Turner Inc? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Turner Inc' |
Natural Query: What is the average quantity of all products for Adams-Jackson? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Adams-Jackson' |
Natural Query: Show me all products in the go category with a price over $451.23. |
SQL Query: SELECT * FROM products WHERE category = 'go' AND price > 451.23 |
Natural Query: What is the minimum quantity of all products for Higgins-Salas? |
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Higgins-Salas' |
Natural Query: List all customers and their total order value for Campbell, Pratt and Smith. |
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 = 'Campbell, Pratt and Smith' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Rich, Smith and Ross 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 = 'Rich, Smith and Ross' |
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 Velez, Medina and Ramos ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Velez, Medina and Ramos' ORDER BY stock_quantity ASC |
Natural Query: What is the average quantity of all products for Rhodes Ltd? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Rhodes Ltd' |
Natural Query: How many orders were placed for Young-Rivera between 2024-07-20 and 2024-07-27? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Young-Rivera' AND order_date BETWEEN '2024-07-20' AND '2024-07-27' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Ramirez-Swanson 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 = 'Ramirez-Swanson' |
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 6 products by customers for Buckley, Burton and Leon this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Buckley, Burton and Leon' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.