text stringlengths 0 220 |
|---|
JOIN customers c ON s.customer_id = c.customer_id |
WHERE c.age BETWEEN 25 AND 35 |
AND s.company_name = 'Mosley, Evans and Mueller' |
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 Jensen 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 = 'Jensen PLC' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Riddle-Carroll between 2024-06-03 and 2024-07-22? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Riddle-Carroll' AND order_date BETWEEN '2024-06-03' AND '2024-07-22' |
Natural Query: List all customers and their total order value for Cook, Wong and Velasquez. |
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 = 'Cook, Wong and Velasquez' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Walton, Green and Hubbard. |
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 = 'Walton, Green and Hubbard' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Griffith 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 = 'Griffith and Sons' GROUP BY c.customer_id |
Natural Query: What are the top 7 products by sales for Cline, Medina and Fletcher all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Cline, Medina and Fletcher' 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 Harrison, Elliott and Hardy 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 = 'Harrison, Elliott and Hardy' |
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 Bird Group? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Bird Group' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: Show me all products in the rise category with a price over $849.38. |
SQL Query: SELECT * FROM products WHERE category = 'rise' AND price > 849.38 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in King-Martinez 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 = 'King-Martinez' |
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 category in Carter-Smith? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Carter-Smith' GROUP BY category ORDER BY total_sales DESC |
Natural Query: Show me all products in the manager category with a price over $895.95. |
SQL Query: SELECT * FROM products WHERE category = 'manager' AND price > 895.95 |
Natural Query: List all products of Moreno Ltd ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Moreno Ltd' ORDER BY rating DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Torres-Smith 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-Smith' |
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 category in Kim Inc? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Kim Inc' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 7 products by customers for Hill LLC last quarter? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Hill LLC' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7 |
Natural Query: What is the maximum quantity of all products for Guzman, Reyes and Johnson? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Guzman, Reyes and Johnson' |
Natural Query: What are the top 8 products by revenue for Pena LLC last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Pena LLC' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 8 |
Natural Query: What is the minimum price of all products for Gonzales, Stout and Rodriguez? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Gonzales, Stout and Rodriguez' |
Natural Query: Show me all products in the worry category with a price over $171.84. |
SQL Query: SELECT * FROM products WHERE category = 'worry' AND price > 171.84 |
Natural Query: What are the top 10 products by revenue for Ward, Grimes and Mcguire this month? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Ward, Grimes and Mcguire' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10 |
Natural Query: Show me all products in the drop category with a price over $254.77. |
SQL Query: SELECT * FROM products WHERE category = 'drop' AND price > 254.77 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.