text stringlengths 0 220 |
|---|
SQL Query: SELECT * FROM products WHERE company_name = 'Cisneros LLC' ORDER BY stock_quantity DESC |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Lee Group 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 = 'Lee Group' |
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 6 products by orders for Bennett Ltd all time? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Bennett Ltd' AND period = 'all time' GROUP BY product_name ORDER BY total_orders DESC LIMIT 6 |
Natural Query: Show me all products in the politics category with a price over $691.1. |
SQL Query: SELECT * FROM products WHERE category = 'politics' AND price > 691.1 |
Natural Query: List all customers and their total order value for Gutierrez-Wyatt. |
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 = 'Gutierrez-Wyatt' GROUP BY c.customer_id |
Natural Query: What are the top 7 products by sales for Smith, Khan and Tran all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Smith, Khan and Tran' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 7 |
Natural Query: How many orders were placed for Wilkerson and Sons between 2024-01-12 and 2024-04-21? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Wilkerson and Sons' AND order_date BETWEEN '2024-01-12' AND '2024-04-21' |
Natural Query: List all customers and their total order value for Chan-Keith. |
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 = 'Chan-Keith' GROUP BY c.customer_id |
Natural Query: What are the top 3 products by sales for Garcia PLC this year? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Garcia PLC' AND period = 'this year' GROUP BY product_name ORDER BY total_sales DESC LIMIT 3 |
Natural Query: How many orders were placed for Becker Inc between 2023-12-21 and 2024-05-02? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Becker Inc' AND order_date BETWEEN '2023-12-21' AND '2024-05-02' |
Natural Query: List all customers and their total order value for Liu-Benitez. |
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 = 'Liu-Benitez' GROUP BY c.customer_id |
Natural Query: What is the total sales for each category in Stephenson, Joseph and Burgess? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Stephenson, Joseph and Burgess' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What are the top 8 products by sales for Singh-Morales all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Singh-Morales' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 8 |
Natural Query: List all customers and their total order value for Villanueva, Craig and Payne. |
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 = 'Villanueva, Craig and Payne' GROUP BY c.customer_id |
Natural Query: What are the top 5 products by revenue for Johnson Inc this month? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Johnson Inc' AND period = 'this month' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5 |
Natural Query: What is the total sales for each category in Weiss Ltd? |
SQL Query: SELECT category, SUM(sales) as total_sales FROM sales WHERE company_name = 'Weiss Ltd' GROUP BY category ORDER BY total_sales DESC |
Natural Query: What is the maximum quantity of all products for Perez and Sons? |
SQL Query: SELECT MAXIMUM(quantity) as result FROM products WHERE company_name = 'Perez and Sons' |
Natural Query: List all customers and their total order value for Davila-Schroeder. |
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 = 'Davila-Schroeder' GROUP BY c.customer_id |
Natural Query: Show me all products in the material category with a price over $21.06. |
SQL Query: SELECT * FROM products WHERE category = 'material' AND price > 21.06 |
Natural Query: What is the total quantity for each supplier in Nash and Sons? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Nash and Sons' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: What are the top 7 products by orders for Johnson-Cooper this month? |
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Johnson-Cooper' AND period = 'this month' GROUP BY product_name ORDER BY total_orders DESC LIMIT 7 |
Natural Query: Show me all products in the movement category with a price over $618.62. |
SQL Query: SELECT * FROM products WHERE category = 'movement' AND price > 618.62 |
Natural Query: Show me all products in the cost category with a price over $356.78. |
SQL Query: SELECT * FROM products WHERE category = 'cost' AND price > 356.78 |
Natural Query: How many orders were placed for Petty LLC between 2024-02-08 and 2024-07-07? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Petty LLC' AND order_date BETWEEN '2024-02-08' AND '2024-07-07' |
Natural Query: What is the minimum quantity of all products for Martin-Martinez? |
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Martin-Martinez' |
Natural Query: List all products of Jackson-Walter ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Jackson-Walter' ORDER BY rating ASC |
Natural Query: List all products of Harrison, Mitchell and Barrera ordered by stock_quantity from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Harrison, Mitchell and Barrera' ORDER BY stock_quantity DESC |
Natural Query: What are the top 10 products by customers for Burns, Russell and Miller this month? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Burns, Russell and Miller' AND period = 'this month' GROUP BY product_name ORDER BY total_customers DESC LIMIT 10 |
Natural Query: What are the top 5 products by revenue for Taylor Ltd last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Taylor Ltd' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5 |
Natural Query: What is the minimum rating of all products for Bautista, Church and Williamson? |
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Bautista, Church and Williamson' |
Natural Query: List all customers and their total order value for Wells, Hunt and Evans. |
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 = 'Wells, Hunt and Evans' 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.