text stringlengths 0 220 |
|---|
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Williams and Sons 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 = 'Williams and Sons' |
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 minimum rating of all products for Hansen LLC? |
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Hansen LLC' |
Natural Query: What is the total quantity for each category in Rivas-Rich? |
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Rivas-Rich' GROUP BY category ORDER BY total_quantity DESC |
Natural Query: What is the average price of all products for Montes-Hardin? |
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Montes-Hardin' |
Natural Query: List all customers and their total order value for Martin, Weiss and Bell. |
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 = 'Martin, Weiss and Bell' GROUP BY c.customer_id |
Natural Query: What is the total quantity for each country in Richardson, Mullen and Costa? |
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Richardson, Mullen and Costa' GROUP BY country ORDER BY total_quantity DESC |
Natural Query: List all products of Johnson LLC ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson LLC' ORDER BY price DESC |
Natural Query: List all customers and their total order value for Vasquez-Lindsey. |
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 = 'Vasquez-Lindsey' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Hall, Ramirez and Jones between 2024-01-24 and 2024-03-15? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hall, Ramirez and Jones' AND order_date BETWEEN '2024-01-24' AND '2024-03-15' |
Natural Query: Show me all products in the mission category with a price over $424.56. |
SQL Query: SELECT * FROM products WHERE category = 'mission' AND price > 424.56 |
Natural Query: What is the minimum rating of all products for Flores PLC? |
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Flores PLC' |
Natural Query: What is the minimum price of all products for Sanders, Gutierrez and Shaffer? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Sanders, Gutierrez and Shaffer' |
Natural Query: What is the minimum quantity of all products for Mccann, Rivera and Lewis? |
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Mccann, Rivera and Lewis' |
Natural Query: What is the total profit for each category in Ryan, Carrillo and Nelson? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Ryan, Carrillo and Nelson' GROUP BY category ORDER BY total_profit DESC |
Natural Query: List all products of Cole Ltd ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Cole Ltd' ORDER BY rating ASC |
Natural Query: How many orders were placed for Baker, Kirby and Osborne between 2024-01-11 and 2024-01-15? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Baker, Kirby and Osborne' AND order_date BETWEEN '2024-01-11' AND '2024-01-15' |
Natural Query: Show me all products in the sure category with a price over $899.5. |
SQL Query: SELECT * FROM products WHERE category = 'sure' AND price > 899.5 |
Natural Query: List all products of Tran LLC ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Tran LLC' ORDER BY rating DESC |
Natural Query: What are the top 9 products by customers for Fisher-Palmer this month? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Fisher-Palmer' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9 |
Natural Query: Show me all products in the watch category with a price over $843.7. |
SQL Query: SELECT * FROM products WHERE category = 'watch' AND price > 843.7 |
Natural Query: List all products of Kim LLC ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Kim LLC' ORDER BY stock_quantity ASC |
Natural Query: What is the total quantity for each country in Hill-Wood? |
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Hill-Wood' GROUP BY country ORDER BY total_quantity DESC |
Natural Query: How many orders were placed for Hunter, Davis and Peterson between 2024-04-29 and 2024-08-29? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hunter, Davis and Peterson' AND order_date BETWEEN '2024-04-29' AND '2024-08-29' |
Natural Query: List all products of Turner-Nielsen ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Turner-Nielsen' ORDER BY rating DESC |
Natural Query: What is the maximum rating of all products for Solomon Group? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Solomon Group' |
Natural Query: What is the total sales for each category in Hoffman, Mathis and Morris? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hoffman, Mathis and Morris' GROUP BY category ORDER BY total_sales DESC |
Natural Query: Show me all products in the term category with a price over $361.7. |
SQL Query: SELECT * FROM products WHERE category = 'term' AND price > 361.7 |
Natural Query: What are the top 6 products by customers for Sullivan, Williams and Carpenter last quarter? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Sullivan, Williams and Carpenter' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 6 |
Natural Query: What are the top 9 products by revenue for Hill-Smith this month? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Hill-Smith' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 9 |
Natural Query: List all products of Mccoy Group ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Mccoy Group' ORDER BY rating DESC |
Natural Query: How many orders were placed for Gomez Inc between 2024-06-18 and 2024-09-14? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.