text stringlengths 0 220 |
|---|
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 = 'Ramos 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 are the top 5 categories by sales for customers aged 25-35 in Hart-Harris 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 = 'Hart-Harris' |
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 Ballard-Wood ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Ballard-Wood' ORDER BY stock_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gomez Ltd 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 = 'Gomez Ltd' |
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 Hernandez LLC ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Hernandez LLC' ORDER BY price ASC |
Natural Query: What are the top 7 products by sales for Green, Hernandez and Lambert this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Green, Hernandez and Lambert' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: List all customers and their total order value for Morrison-Wilson. |
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 = 'Morrison-Wilson' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Wilson Ltd 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 = 'Wilson Ltd' |
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 full category with a price over $896.94. |
SQL Query: SELECT * FROM products WHERE category = 'full' AND price > 896.94 |
Natural Query: What is the total price of all products for Moreno-Donovan? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Moreno-Donovan' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lewis, Patel and Dennis 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 = 'Lewis, Patel and Dennis' |
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 room category with a price over $914.52. |
SQL Query: SELECT * FROM products WHERE category = 'room' AND price > 914.52 |
Natural Query: What is the total price of all products for Johnson-Davis? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Johnson-Davis' |
Natural Query: What is the average price of all products for Torres, Delacruz and Alexander? |
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Torres, Delacruz and Alexander' |
Natural Query: Show me all products in the support category with a price over $251.16. |
SQL Query: SELECT * FROM products WHERE category = 'support' AND price > 251.16 |
Natural Query: How many orders were placed for Thomas, Taylor and Herman between 2023-11-08 and 2024-06-28? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thomas, Taylor and Herman' AND order_date BETWEEN '2023-11-08' AND '2024-06-28' |
Natural Query: How many orders were placed for Hoffman-Patterson between 2023-10-15 and 2024-06-21? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hoffman-Patterson' AND order_date BETWEEN '2023-10-15' AND '2024-06-21' |
Natural Query: What are the top 5 products by customers for Williams, Johnson and Guzman this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Williams, Johnson and Guzman' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5 |
Natural Query: Show me all products in the skin category with a price over $969.33. |
SQL Query: SELECT * FROM products WHERE category = 'skin' AND price > 969.33 |
Natural Query: Show me all products in the institution category with a price over $322.23. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.