text stringlengths 0 220 |
|---|
Natural Query: What are the top 4 products by revenue for Shelton-Baker last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Shelton-Baker' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 4 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mclaughlin PLC 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 = 'Mclaughlin PLC' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Natural Query: Show me all products in the hotel category with a price over $525.74. |
SQL Query: SELECT * FROM products WHERE category = 'hotel' AND price > 525.74 |
Natural Query: List all customers and their total order value for Spencer, Bradshaw and Grant. |
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 = 'Spencer, Bradshaw and Grant' GROUP BY c.customer_id |
Natural Query: What is the total sales for each supplier in Thomas-Mccullough? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Thomas-Mccullough' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: List all products of Walker-Craig ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Walker-Craig' ORDER BY price ASC |
Natural Query: How many orders were placed for Jackson Group between 2024-06-06 and 2024-08-10? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jackson Group' AND order_date BETWEEN '2024-06-06' AND '2024-08-10' |
Natural Query: What are the top 5 products by sales for Burke-Haley all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Burke-Haley' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 5 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Carpenter, Lee 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 = 'Carpenter, Lee 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 are the top 7 products by sales for Andersen Ltd all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Andersen Ltd' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: What are the top 6 products by revenue for Frederick Inc this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Frederick Inc' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6 |
Natural Query: Show me all products in the without category with a price over $204.5. |
SQL Query: SELECT * FROM products WHERE category = 'without' AND price > 204.5 |
Natural Query: List all products of Morales Group ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Morales Group' ORDER BY stock_quantity DESC |
Natural Query: What are the top 7 products by sales for Moreno LLC all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Moreno LLC' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Cooke, Jackson and Porter 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 = 'Cooke, Jackson and Porter' |
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 sales for each supplier in Johnson, Harmon and Weiss? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Johnson, Harmon and Weiss' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: List all customers and their total order value for Robertson LLC. |
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 = 'Robertson LLC' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Miller, Marsh and Prince. |
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 = 'Miller, Marsh and Prince' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Casey-Boyd. |
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 = 'Casey-Boyd' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Smith, Ryan and Cherry 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 = 'Smith, Ryan and Cherry' |
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 products by customers for Ross-Gutierrez all time? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Ross-Gutierrez' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.