text stringlengths 0 220 |
|---|
Natural Query: What is the total quantity for each supplier in Brown, Johnson and Parker? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Brown, Johnson and Parker' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Peters 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 = 'Peters Group' |
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 Rojas and Sons between 2024-07-17 and 2024-08-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rojas and Sons' AND order_date BETWEEN '2024-07-17' AND '2024-08-08' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gibson-Miller 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 = 'Gibson-Miller' |
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 maximum price of all products for Holt LLC? |
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Holt LLC' |
Natural Query: How many orders were placed for Dyer-Powers between 2024-03-28 and 2024-08-23? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Dyer-Powers' AND order_date BETWEEN '2024-03-28' AND '2024-08-23' |
Natural Query: Show me all products in the manager category with a price over $937.49. |
SQL Query: SELECT * FROM products WHERE category = 'manager' AND price > 937.49 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Harrington-Hart 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 = 'Harrington-Hart' |
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 Peterson-Reed. |
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 = 'Peterson-Reed' GROUP BY c.customer_id |
Natural Query: What are the top 7 products by sales for Nguyen-Blair this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Nguyen-Blair' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: How many orders were placed for Fisher, Chen and Carrillo between 2023-12-24 and 2024-08-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Fisher, Chen and Carrillo' AND order_date BETWEEN '2023-12-24' AND '2024-08-08' |
Natural Query: What is the average quantity of all products for Blair, Hull and Allen? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Blair, Hull and Allen' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Clark 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 = 'Clark Group' |
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 maximum quantity of all products for Gonzalez Ltd? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Gonzalez Ltd' |
Natural Query: List all customers and their total order value for Contreras, Jones and Massey. |
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 = 'Contreras, Jones and Massey' GROUP BY c.customer_id |
Natural Query: What is the total rating of all products for Robinson-Thompson? |
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Robinson-Thompson' |
Natural Query: What are the top 9 products by revenue for Elliott-Terry this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Elliott-Terry' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 9 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Silva 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 = 'Silva PLC' |
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 customers for Marquez LLC this month? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.