text stringlengths 0 220 |
|---|
AND s.company_name = 'Patterson-Sullivan' |
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 Fuentes-Escobar ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Fuentes-Escobar' ORDER BY rating ASC |
Natural Query: Show me all products in the at category with a price over $592.16. |
SQL Query: SELECT * FROM products WHERE category = 'at' AND price > 592.16 |
Natural Query: What is the total quantity of all products for Herrera-Evans? |
SQL Query: SELECT TOTAL(quantity) as result FROM products WHERE company_name = 'Herrera-Evans' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Porter, Rogers and Perez 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 = 'Porter, Rogers and Perez' |
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 Scott, Davis and Rivera between 2023-12-25 and 2024-07-31? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Scott, Davis and Rivera' AND order_date BETWEEN '2023-12-25' AND '2024-07-31' |
Natural Query: What is the average rating of all products for Williamson and Sons? |
SQL Query: SELECT AVERAGE(rating) as result FROM products WHERE company_name = 'Williamson and Sons' |
Natural Query: How many orders were placed for Melendez, Henderson and Petersen between 2024-04-29 and 2024-06-17? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Melendez, Henderson and Petersen' AND order_date BETWEEN '2024-04-29' AND '2024-06-17' |
Natural Query: Show me all products in the among category with a price over $499.88. |
SQL Query: SELECT * FROM products WHERE category = 'among' AND price > 499.88 |
Natural Query: What is the total rating of all products for Rios and Sons? |
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Rios and Sons' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Curtis 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 = 'Curtis 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 Turner, Hansen and Griffin. |
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 = 'Turner, Hansen and Griffin' GROUP BY c.customer_id |
Natural Query: What are the top 8 products by customers for Coffey-Jones this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Coffey-Jones' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 8 |
Natural Query: What are the top 10 products by sales for Turner, Kelly and Smith all time? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Turner, Kelly and Smith' AND period = 'all time' GROUP BY product_name ORDER BY total_sales DESC LIMIT 10 |
Natural Query: Show me all products in the child category with a price over $635.24. |
SQL Query: SELECT * FROM products WHERE category = 'child' AND price > 635.24 |
Natural Query: What is the total quantity for each category in King-Robinson? |
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'King-Robinson' GROUP BY category ORDER BY total_quantity DESC |
Natural Query: What is the average quantity of all products for Porter PLC? |
SQL Query: SELECT AVERAGE(quantity) as result FROM products WHERE company_name = 'Porter PLC' |
Natural Query: List all customers and their total order value for Rodriguez 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 = 'Rodriguez Group' GROUP BY c.customer_id |
Natural Query: How many orders were placed for Howard Inc between 2024-03-14 and 2024-08-06? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Howard Inc' AND order_date BETWEEN '2024-03-14' AND '2024-08-06' |
Natural Query: List all products of Allen, Ryan and Smith ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Allen, Ryan and Smith' ORDER BY rating DESC |
Natural Query: What are the top 4 products by sales for Mcmillan Ltd this month? |
SQL Query: SELECT product_name, SUM(sales) as total_sales FROM sales WHERE company_name = 'Mcmillan Ltd' AND period = 'this month' GROUP BY product_name ORDER BY total_sales DESC LIMIT 4 |
Natural Query: What are the top 10 products by revenue for Andrews and Sons this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Andrews and Sons' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 10 |
Natural Query: What are the top 7 products by customers for Sullivan, Monroe and Gordon this year? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Sullivan, Monroe and Gordon' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 7 |
Natural Query: What is the total quantity for each supplier in Parker LLC? |
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Parker LLC' GROUP BY supplier ORDER BY total_quantity DESC |
Natural Query: Show me all products in the past category with a price over $37.43. |
SQL Query: SELECT * FROM products WHERE category = 'past' AND price > 37.43 |
Natural Query: What are the top 8 products by revenue for Smith, Prince and Gomez last quarter? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Smith, Prince and Gomez' AND period = 'last quarter' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 8 |
Natural Query: What is the total profit for each supplier in Ellis-Lee? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.