text stringlengths 0 220 |
|---|
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 Small-Smith ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Small-Smith' ORDER BY stock_quantity ASC |
Natural Query: What is the average rating of all products for Coleman-Singleton? |
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Coleman-Singleton' |
Natural Query: What is the average quantity of all products for Cook, Powell and Sellers? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Cook, Powell and Sellers' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Hernandez-Pacheco 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 = 'Hernandez-Pacheco' |
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 Lloyd, Le and Rice? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Lloyd, Le and Rice' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What are the top 8 products by sales for Carlson Ltd this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Carlson Ltd' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8 |
Natural Query: List all products of Sampson-Allen ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Sampson-Allen' ORDER BY price DESC |
Natural Query: List all products of Harris-Hernandez ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Harris-Hernandez' ORDER BY rating DESC |
Natural Query: How many orders were placed for Flynn-Garcia between 2023-12-14 and 2024-01-15? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Flynn-Garcia' AND order_date BETWEEN '2023-12-14' AND '2024-01-15' |
Natural Query: Show me all products in the describe category with a price over $487.58. |
SQL Query: SELECT * FROM products WHERE category = 'describe' AND price > 487.58 |
Natural Query: What is the total quantity for each supplier in Taylor Group? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Taylor Group' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 5 products by customers for Franklin Group this month? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Franklin Group' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5 |
Natural Query: What is the total quantity for each supplier in Stevens Inc? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Stevens Inc' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What is the total sales for each supplier in Khan, Martin and Taylor? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Khan, Martin and Taylor' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: What are the top 3 products by revenue for Russo-Rodriguez this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Russo-Rodriguez' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3 |
Natural Query: List all products of Sanchez, Lewis and King ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Sanchez, Lewis and King' ORDER BY price ASC |
Natural Query: What are the top 7 products by revenue for Miller LLC this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Miller LLC' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Frost, Bailey and Wright 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 = 'Frost, Bailey and Wright' |
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 Miller Ltd between 2024-03-06 and 2024-09-12? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Miller Ltd' AND order_date BETWEEN '2024-03-06' AND '2024-09-12' |
Natural Query: What is the total profit for each supplier in Bishop, Reyes and Johnson? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Bishop, Reyes and Johnson' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: Show me all products in the nothing category with a price over $930.54. |
SQL Query: SELECT * FROM products WHERE category = 'nothing' AND price > 930.54 |
Natural Query: How many orders were placed for Hays-Alvarez between 2024-01-30 and 2024-06-24? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hays-Alvarez' AND order_date BETWEEN '2024-01-30' AND '2024-06-24' |
Natural Query: What is the average rating of all products for Farley, Brown and Williams? |
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Farley, Brown and Williams' |
Natural Query: What are the top 6 products by revenue for Wilson-Brown last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Wilson-Brown' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6 |
Natural Query: What is the total sales for each supplier in Fernandez PLC? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Fernandez PLC' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: How many orders were placed for Serrano PLC between 2024-08-13 and 2024-09-06? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Serrano PLC' AND order_date BETWEEN '2024-08-13' AND '2024-09-06' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.