text stringlengths 0 220 |
|---|
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 = 'Stewart, Mcfarland and Williams' GROUP BY c.customer_id |
Natural Query: What is the total profit for each supplier in Turner-Dorsey? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Turner-Dorsey' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: List all customers and their total order value for Saunders Ltd. |
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 = 'Saunders Ltd' GROUP BY c.customer_id |
Natural Query: List all products of Parker, Jones and Hines ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Parker, Jones and Hines' ORDER BY price ASC |
Natural Query: What is the total profit for each country in Wright Ltd? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Wright Ltd' GROUP BY country ORDER BY total_profit DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Gill, Garza and Fields 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 = 'Gill, Garza and Fields' |
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 4 products by orders for Dougherty PLC this year? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Dougherty PLC' AND period = 'this year' GROUP BY product_name ORDER BY total_orders DESC LIMIT 4 |
Natural Query: Show me all products in the sense category with a price over $727.21. |
SQL Query: SELECT * FROM products WHERE category = 'sense' AND price > 727.21 |
Natural Query: How many orders were placed for Cooper, Pacheco and Coleman between 2023-10-01 and 2024-08-13? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cooper, Pacheco and Coleman' AND order_date BETWEEN '2023-10-01' AND '2024-08-13' |
Natural Query: List all products of Jones-Huerta ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Jones-Huerta' ORDER BY price ASC |
Natural Query: What is the maximum rating of all products for Rosales LLC? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Rosales LLC' |
Natural Query: How many orders were placed for Fischer Group between 2023-12-18 and 2024-03-23? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Fischer Group' AND order_date BETWEEN '2023-12-18' AND '2024-03-23' |
Natural Query: What is the maximum rating of all products for Rodriguez Inc? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Rodriguez Inc' |
Natural Query: What is the minimum price of all products for Mitchell-Gamble? |
SQL Query: SELECT MINIMUM(price) as result FROM products WHERE company_name = 'Mitchell-Gamble' |
Natural Query: Show me all products in the hot category with a price over $178.55. |
SQL Query: SELECT * FROM products WHERE category = 'hot' AND price > 178.55 |
Natural Query: What is the total profit for each country in Brown, Crawford and Thomas? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Brown, Crawford and Thomas' GROUP BY country ORDER BY total_profit DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Stein 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 = 'Stein 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: Show me all products in the chance category with a price over $180.52. |
SQL Query: SELECT * FROM products WHERE category = 'chance' AND price > 180.52 |
Natural Query: What are the top 10 products by customers for Olson-Bowen this month? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Olson-Bowen' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10 |
Natural Query: List all products of Phillips Ltd ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Phillips Ltd' ORDER BY price ASC |
Natural Query: What are the top 6 products by revenue for Miller, Barnes and Wolfe all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Miller, Barnes and Wolfe' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 6 |
Natural Query: List all customers and their total order value for Jackson-Sullivan. |
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 = 'Jackson-Sullivan' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Smith 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 = 'Smith Inc' |
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 Meza 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.