text stringlengths 0 220 |
|---|
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Petersen 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 = 'Petersen PLC' |
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 career category with a price over $933.92. |
SQL Query: SELECT * FROM products WHERE category = 'career' AND price > 933.92 |
Natural Query: List all products of Casey, Flores and Buck ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Casey, Flores and Buck' ORDER BY rating ASC |
Natural Query: List all customers and their total order value for Newman Ltd. |
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 = 'Newman Ltd' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Price Ltd between 2024-09-08 and 2024-09-15? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Price Ltd' AND order_date BETWEEN '2024-09-08' AND '2024-09-15' |
Natural Query: List all products of Wallace-Ortega ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Wallace-Ortega' ORDER BY price ASC |
Natural Query: How many orders were placed for Morgan-Gonzalez between 2024-02-20 and 2024-03-04? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Morgan-Gonzalez' AND order_date BETWEEN '2024-02-20' AND '2024-03-04' |
Natural Query: What is the total price of all products for Moore, Padilla and Weaver? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Moore, Padilla and Weaver' |
Natural Query: List all customers and their total order value for Odonnell-Rodriguez. |
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 = 'Odonnell-Rodriguez' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Chandler and Sons between 2024-03-04 and 2024-04-13? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Chandler and Sons' AND order_date BETWEEN '2024-03-04' AND '2024-04-13' |
Natural Query: Show me all products in the issue category with a price over $508.5. |
SQL Query: SELECT * FROM products WHERE category = 'issue' AND price > 508.5 |
Natural Query: Show me all products in the discuss category with a price over $231.2. |
SQL Query: SELECT * FROM products WHERE category = 'discuss' AND price > 231.2 |
Natural Query: How many orders were placed for Thompson-Scott between 2023-11-29 and 2024-07-17? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thompson-Scott' AND order_date BETWEEN '2023-11-29' AND '2024-07-17' |
Natural Query: List all products of Medina-Goodman ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Medina-Goodman' ORDER BY rating ASC |
Natural Query: How many orders were placed for Ruiz-Hood between 2024-03-31 and 2024-04-16? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ruiz-Hood' AND order_date BETWEEN '2024-03-31' AND '2024-04-16' |
Natural Query: List all products of Allen-Lopez ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Allen-Lopez' ORDER BY rating ASC |
Natural Query: What are the top 6 products by revenue for Lamb, Rivera and Ray this month? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Lamb, Rivera and Ray' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6 |
Natural Query: List all customers and their total order value for Gallegos, Bullock and Wilson. |
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 = 'Gallegos, Bullock and Wilson' GROUP BY c.customer_id |
Natural Query: What is the maximum rating of all products for Berry, Brown and Fleming? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Berry, Brown and Fleming' |
Natural Query: What is the average price of all products for Thomas, Hoffman and Wilson? |
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Thomas, Hoffman and Wilson' |
Natural Query: List all customers and their total order value for Morgan, Johnson and Dudley. |
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 = 'Morgan, Johnson and Dudley' GROUP BY c.customer_id |
Natural Query: What is the maximum quantity of all products for Schroeder-Perry? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Schroeder-Perry' |
Natural Query: What are the top 5 products by orders for Kim PLC this month? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Kim PLC' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 5 |
Natural Query: How many orders were placed for Cruz Group between 2023-11-09 and 2024-04-05? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cruz Group' AND order_date BETWEEN '2023-11-09' AND '2024-04-05' |
Natural Query: What is the total profit for each category in Malone, Miller and Frey? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Malone, Miller and Frey' GROUP BY category ORDER BY total_profit DESC |
Natural Query: List all customers and their total order value for Mora, Carlson and Cobb. |
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 = 'Mora, Carlson and Cobb' GROUP BY c.customer_id |
Natural Query: What is the total profit for each category in Lopez, Murphy and Gomez? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Lopez, Murphy and Gomez' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What is the total quantity for each supplier in Merritt PLC? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Merritt PLC' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Green-Payne 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 = 'Green-Payne' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.