text stringlengths 0 220 |
|---|
Natural Query: What is the maximum quantity of all products for Evans PLC? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Evans PLC' |
Natural Query: What is the total quantity for each category in Jenkins LLC? |
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Jenkins LLC' GROUP BY category ORDER BY total_quantity DESC |
Natural Query: What is the maximum price of all products for Moore, Trevino and Doyle? |
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Moore, Trevino and Doyle' |
Natural Query: What is the total sales for each category in Hughes Ltd? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hughes Ltd' GROUP BY category ORDER BY total_sales DESC |
Natural Query: How many orders were placed for Ward, Howard and Rivas between 2024-05-16 and 2024-07-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ward, Howard and Rivas' AND order_date BETWEEN '2024-05-16' AND '2024-07-08' |
Natural Query: List all products of Esparza Group ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Esparza Group' ORDER BY stock_quantity DESC |
Natural Query: What is the average rating of all products for Galvan, Brown and Page? |
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Galvan, Brown and Page' |
Natural Query: List all products of Patterson-Jones ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Patterson-Jones' ORDER BY rating DESC |
Natural Query: List all customers and their total order value for Rodriguez, Evans and Brown. |
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 = 'Rodriguez, Evans and Brown' GROUP BY c.customer_id |
Natural Query: What is the total sales for each category in Hooper, Rivera and Lopez? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Hooper, Rivera and Lopez' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What is the total quantity for each country in Banks-Phelps? |
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Banks-Phelps' GROUP BY country ORDER BY total_quantity DESC |
Natural Query: List all customers and their total order value for Simon 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 = 'Simon Ltd' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Kemp-Vazquez between 2023-11-15 and 2024-05-07? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Kemp-Vazquez' AND order_date BETWEEN '2023-11-15' AND '2024-05-07' |
Natural Query: How many orders were placed for Mcdaniel and Sons between 2023-12-29 and 2024-05-07? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mcdaniel and Sons' AND order_date BETWEEN '2023-12-29' AND '2024-05-07' |
Natural Query: List all customers and their total order value for Brooks, Hickman and Lopez. |
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 = 'Brooks, Hickman and Lopez' GROUP BY c.customer_id |
Natural Query: Show me all products in the include category with a price over $72.87. |
SQL Query: SELECT * FROM products WHERE category = 'include' AND price > 72.87 |
Natural Query: What is the total profit for each category in Santos-Deleon? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Santos-Deleon' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What is the minimum price of all products for Clark, Hale and Lewis? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Clark, Hale and Lewis' |
Natural Query: List all products of Johnson, Smith and Graham ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson, Smith and Graham' ORDER BY stock_quantity ASC |
Natural Query: Show me all products in the thank category with a price over $965.18. |
SQL Query: SELECT * FROM products WHERE category = 'thank' AND price > 965.18 |
Natural Query: How many orders were placed for Byrd-Johnson between 2023-12-16 and 2023-12-24? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Byrd-Johnson' AND order_date BETWEEN '2023-12-16' AND '2023-12-24' |
Natural Query: What are the top 7 products by customers for Moore, Johnson and Moore this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Moore, Johnson and Moore' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7 |
Natural Query: What are the top 5 products by customers for Cole-Reynolds this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Cole-Reynolds' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5 |
Natural Query: List all customers and their total order value for Diaz-Warner. |
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 = 'Diaz-Warner' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Davis-Oconnor. |
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 = 'Davis-Oconnor' GROUP BY c.customer_id |
Natural Query: List all products of Kane, Gonzales and Merritt ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Kane, Gonzales and Merritt' ORDER BY stock_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Howard, Evans and Lewis 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 = 'Howard, Evans and Lewis' |
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 profit for each category in Klein-Gonzalez? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Klein-Gonzalez' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What are the top 9 products by customers for Campbell-Robinson last quarter? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Campbell-Robinson' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9 |
Natural Query: How many orders were placed for Ingram-Fitzpatrick between 2024-06-26 and 2024-08-17? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ingram-Fitzpatrick' AND order_date BETWEEN '2024-06-26' AND '2024-08-17' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Jones Group for the last quarter? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.