text stringlengths 0 220 |
|---|
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Miller, Hardy and Jones' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Watkins Ltd 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 = 'Watkins Ltd' |
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 Morgan-Moore. |
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 = 'Morgan-Moore' GROUP BY c.customer_id |
Natural Query: What are the top 4 products by revenue for Orr-Barnes all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Orr-Barnes' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 4 |
Natural Query: List all products of Patton-Krueger ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Patton-Krueger' ORDER BY price DESC |
Natural Query: List all products of Robertson Inc ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Robertson Inc' ORDER BY stock_quantity DESC |
Natural Query: List all customers and their total order value for Dillon, Daugherty and Alexander. |
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 = 'Dillon, Daugherty and Alexander' GROUP BY c.customer_id |
Natural Query: List all products of Russell and Sons ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Russell and Sons' ORDER BY price DESC |
Natural Query: Show me all products in the officer category with a price over $279.41. |
SQL Query: SELECT * FROM products WHERE category = 'officer' AND price > 279.41 |
Natural Query: What is the total quantity of all products for Wallace, Hobbs and Sharp? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Wallace, Hobbs and Sharp' |
Natural Query: List all customers and their total order value for Merritt-Snow. |
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 = 'Merritt-Snow' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Romero-Moore between 2023-12-11 and 2024-07-04? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Romero-Moore' AND order_date BETWEEN '2023-12-11' AND '2024-07-04' |
Natural Query: Show me all products in the site category with a price over $19.22. |
SQL Query: SELECT * FROM products WHERE category = 'site' AND price > 19.22 |
Natural Query: What is the total profit for each category in Valenzuela, Olsen and Brown? |
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Valenzuela, Olsen and Brown' GROUP BY category ORDER BY total_profit DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Neal-Horne 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 = 'Neal-Horne' |
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 Turner, Griffin and Bishop between 2023-12-08 and 2024-02-04? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Turner, Griffin and Bishop' AND order_date BETWEEN '2023-12-08' AND '2024-02-04' |
Natural Query: How many orders were placed for Cooper Group between 2024-05-23 and 2024-06-02? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cooper Group' AND order_date BETWEEN '2024-05-23' AND '2024-06-02' |
Natural Query: How many orders were placed for Cruz-Smith between 2024-05-22 and 2024-08-02? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Cruz-Smith' AND order_date BETWEEN '2024-05-22' AND '2024-08-02' |
Natural Query: How many orders were placed for Rodriguez, Jackson and Hernandez between 2024-08-29 and 2024-09-12? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Rodriguez, Jackson and Hernandez' AND order_date BETWEEN '2024-08-29' AND '2024-09-12' |
Natural Query: List all products of Kirby PLC ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Kirby PLC' ORDER BY stock_quantity ASC |
Natural Query: How many orders were placed for Hill Group between 2024-01-17 and 2024-08-29? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Hill Group' AND order_date BETWEEN '2024-01-17' AND '2024-08-29' |
Natural Query: What are the top 9 products by revenue for Butler, Frazier and Hickman last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Butler, Frazier and Hickman' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 9 |
Natural Query: List all customers and their total order value for Buckley 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 = 'Buckley Group' GROUP BY c.customer_id |
Natural Query: List all customers and their total order value for Guerrero 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 = 'Guerrero Group' GROUP BY c.customer_id |
Natural Query: Show me all products in the easy category with a price over $234.54. |
SQL Query: SELECT * FROM products WHERE category = 'easy' AND price > 234.54 |
Natural Query: Show me all products in the opportunity category with a price over $287.64. |
SQL Query: SELECT * FROM products WHERE category = 'opportunity' AND price > 287.64 |
Natural Query: What are the top 6 products by orders for Johnson, Hughes and Conner this month? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Johnson, Hughes and Conner' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6 |
Natural Query: What are the top 10 products by orders for Watkins and Sons this month? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Watkins and Sons' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.