text stringlengths 0 220 |
|---|
WHERE c.age BETWEEN 25 AND 35 |
AND s.company_name = 'Hernandez 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 Brown, Mueller and Mclaughlin. |
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 = 'Brown, Mueller and Mclaughlin' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Wilson-Combs. |
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 = 'Wilson-Combs' GROUP BY c.customer_id |
Natural Query: Show me all products in the fire category with a price over $803.54. |
SQL Query: SELECT * FROM products WHERE category = 'fire' AND price > 803.54 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Edwards PLC 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 = 'Edwards PLC' |
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 Davila, Stafford and Fuentes between 2024-04-12 and 2024-08-20? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davila, Stafford and Fuentes' AND order_date BETWEEN '2024-04-12' AND '2024-08-20' |
Natural Query: What is the minimum rating of all products for Brown, Allen and Suarez? |
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Brown, Allen and Suarez' |
Natural Query: How many orders were placed for Thompson-Hernandez between 2024-01-16 and 2024-08-11? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thompson-Hernandez' AND order_date BETWEEN '2024-01-16' AND '2024-08-11' |
Natural Query: Show me all products in the deal category with a price over $468.21. |
SQL Query: SELECT * FROM products WHERE category = 'deal' AND price > 468.21 |
Natural Query: List all customers and their total order value for Day-Ramirez. |
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 = 'Day-Ramirez' GROUP BY c.customer_id |
Natural Query: List all products of Sanford Ltd ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Sanford Ltd' ORDER BY rating DESC |
Natural Query: List all customers and their total order value for Payne, Lloyd and Acosta. |
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 = 'Payne, Lloyd and Acosta' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Davis-Frazier 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 = 'Davis-Frazier' |
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 Dickson-Duffy. |
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 = 'Dickson-Duffy' GROUP BY c.customer_id |
Natural Query: What is the total profit for each supplier in Thomas-Davis? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Thomas-Davis' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: What is the total quantity of all products for Bowman-Hartman? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Bowman-Hartman' |
Natural Query: What is the total sales for each supplier in Diaz, Boone and Henry? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Diaz, Boone and Henry' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: What are the top 4 products by sales for Taylor-Burton this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Taylor-Burton' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 4 |
Natural Query: What is the total profit for each category in Turner-Mills? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Turner-Mills' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What are the top 4 products by customers for Osborne, Monroe and White all time? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Osborne, Monroe and White' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Moore-Day 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 = 'Moore-Day' |
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 Garcia-Harris. |
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 = 'Garcia-Harris' GROUP BY c.customer_id |
Natural Query: What is the minimum price of all products for Reynolds-Smith? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Reynolds-Smith' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.