text stringlengths 0 220 |
|---|
Natural Query: What is the total quantity of all products for Bell-Morse? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Bell-Morse' |
Natural Query: What are the top 6 products by orders for Moran-Simpson this year? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Moran-Simpson' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6 |
Natural Query: How many orders were placed for French-Hunt between 2023-11-18 and 2024-08-23? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'French-Hunt' AND order_date BETWEEN '2023-11-18' AND '2024-08-23' |
Natural Query: What is the total profit for each supplier in Sanchez LLC? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Sanchez LLC' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: List all products of Hale-Myers ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Hale-Myers' ORDER BY rating ASC |
Natural Query: List all customers and their total order value for Hernandez and Sons. |
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 = 'Hernandez and Sons' GROUP BY c.customer_id |
Natural Query: What are the top 3 products by sales for Watson-Gonzalez this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Watson-Gonzalez' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Browning, Young and Ross 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 = 'Browning, Young and Ross' |
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 Mitchell Group between 2024-02-16 and 2024-05-05? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Mitchell Group' AND order_date BETWEEN '2024-02-16' AND '2024-05-05' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Tucker 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 = 'Tucker PLC' |
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 Turner-Kelly 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 = 'Turner-Kelly' |
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 Jackson Inc ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Jackson Inc' ORDER BY stock_quantity DESC |
Natural Query: Show me all products in the cut category with a price over $722.72. |
SQL Query: SELECT * FROM products WHERE category = 'cut' AND price > 722.72 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Potter-Ortega 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 = 'Potter-Ortega' |
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 Martin-Reed ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Martin-Reed' ORDER BY stock_quantity DESC |
Natural Query: What is the total sales for each country in Perry, Ayala and Zamora? |
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Perry, Ayala and Zamora' GROUP BY country ORDER BY total_sales DESC |
Natural Query: What is the total quantity of all products for Hancock Group? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Hancock Group' |
Natural Query: What is the total rating of all products for Miller-Pena? |
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Miller-Pena' |
Natural Query: Show me all products in the coach category with a price over $37.97. |
SQL Query: SELECT * FROM products WHERE category = 'coach' AND price > 37.97 |
Natural Query: What is the total price of all products for Hunter, Adams and Gonzalez? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Hunter, Adams and Gonzalez' |
Natural Query: List all customers and their total order value for Jenkins, Holden 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 = 'Jenkins, Holden and Jones' GROUP BY c.customer_id |
Natural Query: What are the top 8 products by orders for Smith, Davenport and Green this year? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.