text stringlengths 0 220 |
|---|
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Barrera-Stevens 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 = 'Barrera-Stevens' |
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 Powell 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 = 'Powell LLC' GROUP BY c.customer_id |
Natural Query: What is the minimum price of all products for Conway-Chavez? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Conway-Chavez' |
Natural Query: Show me all products in the fly category with a price over $738.11. |
SQL Query: SELECT * FROM products WHERE category = 'fly' AND price > 738.11 |
Natural Query: Show me all products in the hospital category with a price over $248.13. |
SQL Query: SELECT * FROM products WHERE category = 'hospital' AND price > 248.13 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Cameron, Jacobs and Price 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 = 'Cameron, Jacobs and Price' |
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 Clarke, Carroll and Baker between 2024-03-15 and 2024-09-03? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Clarke, Carroll and Baker' AND order_date BETWEEN '2024-03-15' AND '2024-09-03' |
Natural Query: What are the top 5 products by orders for Smith Group this year? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Smith Group' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 5 |
Natural Query: Show me all products in the represent category with a price over $63.38. |
SQL Query: SELECT * FROM products WHERE category = 'represent' AND price > 63.38 |
Natural Query: List all customers and their total order value for Lawrence Group. |
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 = 'Lawrence Group' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Smith, Smith and Wells between 2024-02-01 and 2024-08-25? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Smith, Smith and Wells' AND order_date BETWEEN '2024-02-01' AND '2024-08-25' |
Natural Query: List all customers and their total order value for Chavez, Wang and Hernandez. |
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 = 'Chavez, Wang and Hernandez' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Mathis-Becker between 2024-07-18 and 2024-07-23? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mathis-Becker' AND order_date BETWEEN '2024-07-18' AND '2024-07-23' |
Natural Query: List all customers and their total order value for Adams-Olson. |
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 = 'Adams-Olson' GROUP BY c.customer_id |
Natural Query: List all products of Harvey-Little ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Harvey-Little' ORDER BY stock_quantity ASC |
Natural Query: What is the total rating of all products for Hogan Ltd? |
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Hogan Ltd' |
Natural Query: What is the total profit for each country in Ritter and Sons? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Ritter and Sons' GROUP BY country ORDER BY total_profit DESC |
Natural Query: List all customers and their total order value for Gonzalez, Garcia and Gonzalez. |
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 = 'Gonzalez, Garcia and Gonzalez' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Grant 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 = 'Grant 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 strategy category with a price over $251.77. |
SQL Query: SELECT * FROM products WHERE category = 'strategy' AND price > 251.77 |
Natural Query: Show me all products in the including category with a price over $138.02. |
SQL Query: SELECT * FROM products WHERE category = 'including' AND price > 138.02 |
Natural Query: Show me all products in the they category with a price over $21.92. |
SQL Query: SELECT * FROM products WHERE category = 'they' AND price > 21.92 |
Natural Query: What is the maximum rating of all products for Shelton, Collier and Dean? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Shelton, Collier and Dean' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Sawyer, Aguirre and Wong 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.