text stringlengths 0 220 |
|---|
LIMIT 5 |
Natural Query: What is the total sales for each category in Taylor Ltd? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Taylor Ltd' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Schwartz-Morgan 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 = 'Schwartz-Morgan' |
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 customers and their total order value for Lee PLC. |
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 = 'Lee PLC' GROUP BY c.customer_id |
Natural Query: What is the total quantity for each supplier in Greene and Sons? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Greene and Sons' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Torres, Mcdonald and Garcia 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 = 'Torres, Mcdonald and Garcia' |
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 average rating of all products for Smith, Meza and Acosta? |
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Smith, Meza and Acosta' |
Natural Query: List all products of Andrews, Lopez and Foster ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Andrews, Lopez and Foster' ORDER BY stock_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hayes, Green and Perez 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 = 'Hayes, Green and Perez' |
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 country in Vaughn Group? |
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Vaughn Group' GROUP BY country ORDER BY total_quantity DESC |
Natural Query: What is the total sales for each category in Harris Group? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Harris Group' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What is the average price of all products for Jones LLC? |
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Jones LLC' |
Natural Query: List all customers and their total order value for Melendez and Sons. |
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 = 'Melendez and Sons' GROUP BY c.customer_id |
Natural Query: What is the minimum price of all products for Walters and Sons? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Walters and Sons' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Poole Group 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 = 'Poole Group' |
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 Shah-Garner ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Shah-Garner' ORDER BY rating ASC |
Natural Query: Show me all products in the the category with a price over $243.59. |
SQL Query: SELECT * FROM products WHERE category = 'the' AND price > 243.59 |
Natural Query: What is the total rating of all products for Matthews-Shah? |
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Matthews-Shah' |
Natural Query: List all products of Simpson Group ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Simpson Group' ORDER BY price ASC |
Natural Query: How many orders were placed for Johnson, Scott and Myers between 2024-02-28 and 2024-09-09? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson, Scott and Myers' AND order_date BETWEEN '2024-02-28' AND '2024-09-09' |
Natural Query: How many orders were placed for Thomas Ltd between 2024-04-25 and 2024-07-30? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thomas Ltd' AND order_date BETWEEN '2024-04-25' AND '2024-07-30' |
Natural Query: What is the maximum rating of all products for Powers, Braun and Boyd? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Powers, Braun and Boyd' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.