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 = 'Sawyer, Aguirre and Wong' |
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 Williams, Perez and Peck. |
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 = 'Williams, Perez and Peck' GROUP BY c.customer_id |
Natural Query: What is the total sales for each country in Pham-Graves? |
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Pham-Graves' GROUP BY country ORDER BY total_sales DESC |
Natural Query: How many orders were placed for Warren LLC between 2024-08-19 and 2024-08-29? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Warren LLC' AND order_date BETWEEN '2024-08-19' AND '2024-08-29' |
Natural Query: How many orders were placed for Ross-Ellison between 2024-04-12 and 2024-08-29? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ross-Ellison' AND order_date BETWEEN '2024-04-12' AND '2024-08-29' |
Natural Query: List all products of Lopez LLC ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Lopez LLC' ORDER BY stock_quantity DESC |
Natural Query: What are the top 9 products by sales for Dunn LLC this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Dunn LLC' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 9 |
Natural Query: List all customers and their total order value for Diaz, Cox and Jones. |
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 = 'Diaz, Cox and Jones' GROUP BY c.customer_id |
Natural Query: What is the total price of all products for Hubbard-Valdez? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Hubbard-Valdez' |
Natural Query: How many orders were placed for Williams, Davis and Davis between 2024-06-21 and 2024-08-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Williams, Davis and Davis' AND order_date BETWEEN '2024-06-21' AND '2024-08-08' |
Natural Query: Show me all products in the inside category with a price over $39.51. |
SQL Query: SELECT * FROM products WHERE category = 'inside' AND price > 39.51 |
Natural Query: List all products of Evans, Downs and Farrell ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Evans, Downs and Farrell' ORDER BY rating DESC |
Natural Query: What is the total quantity for each supplier in Garcia, Riddle and Norman? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Garcia, Riddle and Norman' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Jacobs-Wilson 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 = 'Jacobs-Wilson' |
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 Thompson-Blackwell 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 = 'Thompson-Blackwell' |
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 thus category with a price over $520.11. |
SQL Query: SELECT * FROM products WHERE category = 'thus' AND price > 520.11 |
Natural Query: List all products of Lin, Sanchez and Morgan ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Lin, Sanchez and Morgan' ORDER BY stock_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Flores-Washington 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 = 'Flores-Washington' |
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 Murillo LLC ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Murillo LLC' ORDER BY rating DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Baker, Jones and Cross 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 = 'Baker, Jones and Cross' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.