text stringlengths 0 220 |
|---|
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 quantity of all products for Brooks-Walls? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Brooks-Walls' |
Natural Query: What are the top 3 products by sales for Johnston LLC this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnston LLC' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3 |
Natural Query: How many orders were placed for Fuentes-Mitchell between 2024-08-16 and 2024-09-07? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Fuentes-Mitchell' AND order_date BETWEEN '2024-08-16' AND '2024-09-07' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Webster-Mueller 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 = 'Webster-Mueller' |
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 Yang, Ryan and Lane. |
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 = 'Yang, Ryan and Lane' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Crawford 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 = 'Crawford Inc' |
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 Soto, Delgado and Ward. |
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 = 'Soto, Delgado and Ward' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Allen-Williams. |
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 = 'Allen-Williams' GROUP BY c.customer_id |
Natural Query: What are the top 7 products by customers for Mays, Mcdonald and Smith all time? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Mays, Mcdonald and Smith' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7 |
Natural Query: What is the total profit for each supplier in Marsh Group? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Marsh Group' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Price, Munoz and Padilla 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 = 'Price, Munoz and Padilla' |
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 Yoder LLC ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Yoder LLC' ORDER BY stock_quantity DESC |
Natural Query: List all products of Anderson-Zhang ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Anderson-Zhang' ORDER BY rating ASC |
Natural Query: How many orders were placed for Ramirez, Young and Burnett between 2024-08-09 and 2024-09-01? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ramirez, Young and Burnett' AND order_date BETWEEN '2024-08-09' AND '2024-09-01' |
Natural Query: Show me all products in the manager category with a price over $397.62. |
SQL Query: SELECT * FROM products WHERE category = 'manager' AND price > 397.62 |
Natural Query: What are the top 10 products by revenue for Bryant, Bailey and Glass this month? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Bryant, Bailey and Glass' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10 |
Natural Query: List all products of Carr, Kelly and Schultz ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Carr, Kelly and Schultz' ORDER BY rating ASC |
Natural Query: Show me all products in the role category with a price over $840.57. |
SQL Query: SELECT * FROM products WHERE category = 'role' AND price > 840.57 |
Natural Query: List all products of Tucker-Bryant ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Tucker-Bryant' ORDER BY rating ASC |
Natural Query: What is the total sales for each supplier in Johnson-Fuller? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnson-Fuller' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Turner 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 = 'Turner Ltd' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.