text stringlengths 0 220 |
|---|
Natural Query: How many orders were placed for Kent, Duncan and Jones between 2024-01-15 and 2024-06-02? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Kent, Duncan and Jones' AND order_date BETWEEN '2024-01-15' AND '2024-06-02' |
Natural Query: Show me all products in the western category with a price over $409.1. |
SQL Query: SELECT * FROM products WHERE category = 'western' AND price > 409.1 |
Natural Query: List all products of Marsh, Ruiz and Hernandez ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Marsh, Ruiz and Hernandez' ORDER BY rating DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Long 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 = 'Long 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 10 products by revenue for Elliott, Jones and Gonzalez this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Elliott, Jones and Gonzalez' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10 |
Natural Query: What is the maximum quantity of all products for Walsh-Smith? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Walsh-Smith' |
Natural Query: What are the top 7 products by sales for Lee, Sanchez and Baker this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Lee, Sanchez and Baker' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: List all customers and their total order value for Hampton Inc. |
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 = 'Hampton Inc' GROUP BY c.customer_id |
Natural Query: List all products of Gutierrez, Patton and Snyder ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Gutierrez, Patton and Snyder' ORDER BY rating DESC |
Natural Query: What is the maximum price of all products for Phillips-Garrison? |
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Phillips-Garrison' |
Natural Query: List all customers and their total order value for Martin Inc. |
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 = 'Martin Inc' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Gonzalez-Martin between 2024-07-06 and 2024-08-22? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gonzalez-Martin' AND order_date BETWEEN '2024-07-06' AND '2024-08-22' |
Natural Query: What are the top 5 products by sales for Rodriguez Group last quarter? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Rodriguez Group' AND period = 'last quarter' GROUP BY product_name ORDER BY total_sales DESC LIMIT 5 |
Natural Query: How many orders were placed for Simpson Group between 2024-02-10 and 2024-08-24? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Simpson Group' AND order_date BETWEEN '2024-02-10' AND '2024-08-24' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Reed 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 = 'Reed PLC' |
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 Ltd between 2024-07-12 and 2024-08-11? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rojas Ltd' AND order_date BETWEEN '2024-07-12' AND '2024-08-11' |
Natural Query: Show me all products in the stuff category with a price over $465.95. |
SQL Query: SELECT * FROM products WHERE category = 'stuff' AND price > 465.95 |
Natural Query: List all customers and their total order value for Rodriguez, Schultz and Bond. |
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 = 'Rodriguez, Schultz and Bond' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Bowen and Sons 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 = 'Bowen and Sons' |
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 price of all products for Cooper, Rodriguez and Jones? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Cooper, Rodriguez and Jones' |
Natural Query: List all products of Velasquez Ltd ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Velasquez Ltd' ORDER BY stock_quantity ASC |
Natural Query: Show me all products in the hand category with a price over $82.04. |
SQL Query: SELECT * FROM products WHERE category = 'hand' AND price > 82.04 |
Natural Query: Show me all products in the arm category with a price over $488.8. |
SQL Query: SELECT * FROM products WHERE category = 'arm' AND price > 488.8 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gaines, Klein and Hunter 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.