text stringlengths 0 220 |
|---|
Natural Query: What is the total profit for each category in French, Johnson and Williams? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'French, Johnson and Williams' GROUP BY category ORDER BY total_profit DESC |
Natural Query: List all products of Mitchell, Anderson and Greene ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Mitchell, Anderson and Greene' ORDER BY rating ASC |
Natural Query: Show me all products in the check category with a price over $935.62. |
SQL Query: SELECT * FROM products WHERE category = 'check' AND price > 935.62 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gardner-Holt 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 = 'Gardner-Holt' |
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 Hill, Rogers and Lee between 2024-04-25 and 2024-07-28? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hill, Rogers and Lee' AND order_date BETWEEN '2024-04-25' AND '2024-07-28' |
Natural Query: List all products of Long Inc ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Long Inc' ORDER BY price DESC |
Natural Query: How many orders were placed for Wolfe, Scott and Miller between 2023-09-25 and 2023-12-12? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wolfe, Scott and Miller' AND order_date BETWEEN '2023-09-25' AND '2023-12-12' |
Natural Query: Show me all products in the bit category with a price over $704.48. |
SQL Query: SELECT * FROM products WHERE category = 'bit' AND price > 704.48 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Potts, Miller and Hawkins 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 = 'Potts, Miller and Hawkins' |
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 Garrett, Herman and Bradshaw ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Garrett, Herman and Bradshaw' ORDER BY stock_quantity DESC |
Natural Query: Show me all products in the us category with a price over $576.76. |
SQL Query: SELECT * FROM products WHERE category = 'us' AND price > 576.76 |
Natural Query: List all customers and their total order value for Perez, Fitzgerald and Ballard. |
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 = 'Perez, Fitzgerald and Ballard' GROUP BY c.customer_id |
Natural Query: List all products of Rocha Group ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Rocha Group' ORDER BY stock_quantity ASC |
Natural Query: What is the minimum price of all products for Barr-Berry? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Barr-Berry' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Swanson, Koch and Tyler 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 = 'Swanson, Koch and Tyler' |
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 Jordan, Fleming and Hoffman between 2024-03-26 and 2024-08-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jordan, Fleming and Hoffman' AND order_date BETWEEN '2024-03-26' AND '2024-08-08' |
Natural Query: How many orders were placed for Dodson Inc between 2023-12-11 and 2024-08-12? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Dodson Inc' AND order_date BETWEEN '2023-12-11' AND '2024-08-12' |
Natural Query: List all products of Jones, Allen and Parsons ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Jones, Allen and Parsons' ORDER BY price ASC |
Natural Query: How many orders were placed for Ramirez LLC between 2023-11-01 and 2023-11-11? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ramirez LLC' AND order_date BETWEEN '2023-11-01' AND '2023-11-11' |
Natural Query: List all products of Mccarthy, Walker and Compton ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Mccarthy, Walker and Compton' ORDER BY stock_quantity DESC |
Natural Query: What are the top 9 products by orders for Parsons-Johnson all time? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Parsons-Johnson' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 9 |
Natural Query: List all products of Mills, Anderson and Perez ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Mills, Anderson and Perez' ORDER BY rating ASC |
Natural Query: How many orders were placed for Lamb-Adams between 2023-12-22 and 2024-07-13? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lamb-Adams' AND order_date BETWEEN '2023-12-22' AND '2024-07-13' |
Natural Query: List all products of Rodriguez, Schwartz and Newton ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Rodriguez, Schwartz and Newton' ORDER BY stock_quantity DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.