text stringlengths 0 220 |
|---|
Natural Query: What is the total price of all products for Martin, Green and Smith? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Martin, Green and Smith' |
Natural Query: What is the average quantity of all products for Martinez-Collins? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Martinez-Collins' |
Natural Query: List all products of Padilla-Rush ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Padilla-Rush' ORDER BY rating DESC |
Natural Query: List all products of Decker Group ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Decker Group' ORDER BY rating DESC |
Natural Query: How many orders were placed for Ruiz-Harding between 2023-09-26 and 2024-02-22? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ruiz-Harding' AND order_date BETWEEN '2023-09-26' AND '2024-02-22' |
Natural Query: Show me all products in the keep category with a price over $730.21. |
SQL Query: SELECT * FROM products WHERE category = 'keep' AND price > 730.21 |
Natural Query: What is the minimum quantity of all products for Brown, West and Henry? |
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Brown, West and Henry' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Wang-Erickson 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 = 'Wang-Erickson' |
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 Benson, Hamilton and Macdonald between 2023-12-28 and 2024-07-24? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Benson, Hamilton and Macdonald' AND order_date BETWEEN '2023-12-28' AND '2024-07-24' |
Natural Query: List all products of Wilson PLC ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Wilson PLC' ORDER BY stock_quantity ASC |
Natural Query: What is the total price of all products for Baker-Wilson? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Baker-Wilson' |
Natural Query: Show me all products in the physical category with a price over $124.5. |
SQL Query: SELECT * FROM products WHERE category = 'physical' AND price > 124.5 |
Natural Query: What are the top 10 products by sales for Montgomery, Cook and Perez this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Montgomery, Cook and Perez' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 10 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Fowler, Henry and Roberts 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 = 'Fowler, Henry and Roberts' |
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 region category with a price over $730.88. |
SQL Query: SELECT * FROM products WHERE category = 'region' AND price > 730.88 |
Natural Query: What are the top 6 products by orders for James-Carson all time? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'James-Carson' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6 |
Natural Query: List all products of Santos-Castillo ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Santos-Castillo' ORDER BY stock_quantity DESC |
Natural Query: Show me all products in the usually category with a price over $261.94. |
SQL Query: SELECT * FROM products WHERE category = 'usually' AND price > 261.94 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gallegos, Larsen and Murray 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 = 'Gallegos, Larsen and Murray' |
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 for each category in Odonnell Inc? |
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Odonnell Inc' GROUP BY category ORDER BY total_quantity DESC |
Natural Query: What is the total profit for each category in Gonzalez, Rodriguez and Soto? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Gonzalez, Rodriguez and Soto' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What is the maximum quantity of all products for Hubbard-Stout? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Hubbard-Stout' |
Natural Query: List all products of Conner-Watts ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Conner-Watts' ORDER BY rating ASC |
Natural Query: How many orders were placed for Davis-Austin between 2023-10-04 and 2024-07-20? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davis-Austin' AND order_date BETWEEN '2023-10-04' AND '2024-07-20' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.