text stringlengths 0 220 |
|---|
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Smith Ltd' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 8 products by sales for Brennan-Hill this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Brennan-Hill' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8 |
Natural Query: List all products of Moss LLC ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Moss LLC' ORDER BY price ASC |
Natural Query: How many orders were placed for Wood Ltd between 2024-07-16 and 2024-09-09? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wood Ltd' AND order_date BETWEEN '2024-07-16' AND '2024-09-09' |
Natural Query: What are the top 5 products by revenue for Bennett-Burke all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Bennett-Burke' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5 |
Natural Query: How many orders were placed for Johnson, Henry and Blackwell between 2023-12-08 and 2024-07-30? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Johnson, Henry and Blackwell' AND order_date BETWEEN '2023-12-08' AND '2024-07-30' |
Natural Query: What are the top 8 products by revenue for Smith-Howard all time? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Smith-Howard' AND period = 'all time' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 8 |
Natural Query: What is the total quantity of all products for Bryan-Davis? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Bryan-Davis' |
Natural Query: List all customers and their total order value for Mckinney PLC. |
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 = 'Mckinney PLC' GROUP BY c.customer_id |
Natural Query: List all products of Morales, Miller and Boyd ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Morales, Miller and Boyd' ORDER BY rating ASC |
Natural Query: How many orders were placed for Evans Inc between 2023-11-03 and 2024-05-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Evans Inc' AND order_date BETWEEN '2023-11-03' AND '2024-05-08' |
Natural Query: What is the maximum price of all products for Glenn-Cordova? |
SQL Query: SELECT MAXIMUM(price) as result FROM products WHERE company_name = 'Glenn-Cordova' |
Natural Query: How many orders were placed for Brown Inc between 2023-12-10 and 2024-05-16? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Brown Inc' AND order_date BETWEEN '2023-12-10' AND '2024-05-16' |
Natural Query: How many orders were placed for Smith, Cooper and Jordan between 2023-10-23 and 2024-06-26? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Smith, Cooper and Jordan' AND order_date BETWEEN '2023-10-23' AND '2024-06-26' |
Natural Query: What is the total profit for each country in Mueller, Jones and Walker? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Mueller, Jones and Walker' GROUP BY country ORDER BY total_profit DESC |
Natural Query: Show me all products in the ready category with a price over $363.65. |
SQL Query: SELECT * FROM products WHERE category = 'ready' AND price > 363.65 |
Natural Query: How many orders were placed for Lee, Hebert and Fuller between 2024-07-15 and 2024-08-08? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lee, Hebert and Fuller' AND order_date BETWEEN '2024-07-15' AND '2024-08-08' |
Natural Query: What is the total quantity for each category in Gallagher PLC? |
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Gallagher PLC' GROUP BY category ORDER BY total_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Vazquez 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 = 'Vazquez 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 4 products by customers for Yang PLC this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Yang PLC' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4 |
Natural Query: Show me all products in the prove category with a price over $448.33. |
SQL Query: SELECT * FROM products WHERE category = 'prove' AND price > 448.33 |
Natural Query: What is the total sales for each category in Phillips PLC? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Phillips PLC' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What is the total sales for each country in Noble-Lamb? |
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Noble-Lamb' GROUP BY country ORDER BY total_sales DESC |
Natural Query: List all customers and their total order value for Flores 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 = 'Flores Ltd' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Carroll Inc between 2024-07-01 and 2024-07-19? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Carroll Inc' AND order_date BETWEEN '2024-07-01' AND '2024-07-19' |
Natural Query: List all products of Moore and Sons ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Moore and Sons' ORDER BY rating DESC |
Natural Query: How many orders were placed for Martinez, Young and Aguilar between 2024-06-14 and 2024-07-07? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Martinez, Young and Aguilar' AND order_date BETWEEN '2024-06-14' AND '2024-07-07' |
Natural Query: What is the maximum quantity of all products for Warren-Abbott? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Warren-Abbott' |
Natural Query: What are the top 9 products by orders for Hart, Walker and Roy all time? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Hart, Walker and Roy' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 9 |
Natural Query: How many orders were placed for Meyer-Garcia between 2024-05-05 and 2024-08-04? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Meyer-Garcia' AND order_date BETWEEN '2024-05-05' AND '2024-08-04' |
Natural Query: List all customers and their total order value for Webb, Johnston and Leonard. |
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 = 'Webb, Johnston and Leonard' GROUP BY c.customer_id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.