text stringlengths 0 220 |
|---|
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Natural Query: List all products of Cook, Watkins and Soto ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Cook, Watkins and Soto' ORDER BY stock_quantity DESC |
Natural Query: How many orders were placed for Wright-Davis between 2024-02-17 and 2024-06-18? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wright-Davis' AND order_date BETWEEN '2024-02-17' AND '2024-06-18' |
Natural Query: List all customers and their total order value for Arroyo-Hill. |
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 = 'Arroyo-Hill' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Collins-Villa between 2024-06-22 and 2024-08-17? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Collins-Villa' AND order_date BETWEEN '2024-06-22' AND '2024-08-17' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Schultz-Kennedy 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 = 'Schultz-Kennedy' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Banks, Deleon and Young 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 = 'Banks, Deleon and Young' |
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 Lee, Hebert and Franklin ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Lee, Hebert and Franklin' ORDER BY rating ASC |
Natural Query: List all products of Brady, Simmons and Sweeney ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Brady, Simmons and Sweeney' ORDER BY stock_quantity ASC |
Natural Query: What is the total profit for each supplier in Martinez-Duarte? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Martinez-Duarte' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: What are the top 4 products by sales for Johnson-Ross this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnson-Ross' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 4 |
Natural Query: Show me all products in the reality category with a price over $567.49. |
SQL Query: SELECT * FROM products WHERE category = 'reality' AND price > 567.49 |
Natural Query: What is the total profit for each country in Wilson-Jackson? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Wilson-Jackson' GROUP BY country ORDER BY total_profit DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Shah 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 = 'Shah 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 Cook, Stevens and Mcgrath ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Cook, Stevens and Mcgrath' ORDER BY rating ASC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Brown, Scott and Estrada 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 = 'Brown, Scott and Estrada' |
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 Davis-Johnston between 2024-03-25 and 2024-05-30? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davis-Johnston' AND order_date BETWEEN '2024-03-25' AND '2024-05-30' |
Natural Query: What are the top 5 products by sales for Herman, Wilson and Arnold all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Herman, Wilson and Arnold' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 5 |
Natural Query: List all products of Jensen LLC ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Jensen LLC' ORDER BY rating DESC |
Natural Query: List all customers and their total order value for James Group. |
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 = 'James Group' GROUP BY c.customer_id |
Natural Query: What is the average quantity of all products for Anderson Ltd? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Anderson Ltd' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.