text stringlengths 0 220 |
|---|
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Bell-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 = 'Bell-Perez' |
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 Collins, Brady and Mcmahon between 2024-06-20 and 2024-08-25? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Collins, Brady and Mcmahon' AND order_date BETWEEN '2024-06-20' AND '2024-08-25' |
Natural Query: Show me all products in the civil category with a price over $452.51. |
SQL Query: SELECT * FROM products WHERE category = 'civil' AND price > 452.51 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Cole-Castillo 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 = 'Cole-Castillo' |
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 Clark Inc 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 Inc' |
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 George Ltd ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'George Ltd' ORDER BY stock_quantity ASC |
Natural Query: List all products of Davidson-Wright ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Davidson-Wright' ORDER BY stock_quantity DESC |
Natural Query: What are the top 6 products by sales for Howe, Morris and Phillips this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Howe, Morris and Phillips' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 6 |
Natural Query: What are the top 5 products by revenue for Mclaughlin, Mason and Waters all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Mclaughlin, Mason and Waters' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5 |
Natural Query: Show me all products in the own category with a price over $348.96. |
SQL Query: SELECT * FROM products WHERE category = 'own' AND price > 348.96 |
Natural Query: List all customers and their total order value for Clark-Cuevas. |
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 = 'Clark-Cuevas' GROUP BY c.customer_id |
Natural Query: What is the total price of all products for Black, Bush and Smith? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Black, Bush and Smith' |
Natural Query: List all products of Bass, Flowers and Green ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Bass, Flowers and Green' ORDER BY rating DESC |
Natural Query: How many orders were placed for Payne-Soto between 2024-02-19 and 2024-06-26? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Payne-Soto' AND order_date BETWEEN '2024-02-19' AND '2024-06-26' |
Natural Query: What are the top 3 products by revenue for Bryan Group this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Bryan Group' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 3 |
Natural Query: List all products of Carlson Inc ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Carlson Inc' ORDER BY price ASC |
Natural Query: Show me all products in the black category with a price over $535.57. |
SQL Query: SELECT * FROM products WHERE category = 'black' AND price > 535.57 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Brooks, Cline and Brown 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 = 'Brooks, Cline and Brown' |
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 Woods, Mann and Ibarra ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Woods, Mann and Ibarra' ORDER BY price DESC |
Natural Query: Show me all products in the true category with a price over $283.68. |
SQL Query: SELECT * FROM products WHERE category = 'true' AND price > 283.68 |
Natural Query: Show me all products in the himself category with a price over $81.12. |
SQL Query: SELECT * FROM products WHERE category = 'himself' AND price > 81.12 |
Natural Query: List all products of Cisneros LLC ordered by stock_quantity from highest to lowest. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.