text stringlengths 0 220 |
|---|
Natural Query: Show me all products in the wife category with a price over $852.07. |
SQL Query: SELECT * FROM products WHERE category = 'wife' AND price > 852.07 |
Natural Query: What are the top 8 products by customers for Lewis Ltd all time? |
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Lewis Ltd' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 8 |
Natural Query: Show me all products in the daughter category with a price over $168.9. |
SQL Query: SELECT * FROM products WHERE category = 'daughter' AND price > 168.9 |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Randall 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 = 'Randall 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: List all customers and their total order value for Ramirez-Clarke. |
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 = 'Ramirez-Clarke' GROUP BY c.customer_id |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Mitchell 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 = 'Mitchell 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: What is the total sales for each country in Rivera Ltd? |
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Rivera Ltd' GROUP BY country ORDER BY total_sales DESC |
Natural Query: List all customers and their total order value for Cardenas-Davis. |
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 = 'Cardenas-Davis' GROUP BY c.customer_id |
Natural Query: What is the total profit for each country in Stewart Group? |
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Stewart Group' GROUP BY country ORDER BY total_profit DESC |
Natural Query: Show me all products in the dream category with a price over $75.36. |
SQL Query: SELECT * FROM products WHERE category = 'dream' AND price > 75.36 |
Natural Query: List all customers and their total order value for Larson 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 = 'Larson Group' GROUP BY c.customer_id |
Natural Query: List all products of Robinson Ltd ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Robinson Ltd' ORDER BY stock_quantity ASC |
Natural Query: List all products of Rose Inc ordered by rating from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Rose Inc' ORDER BY rating ASC |
Natural Query: What is the total price of all products for Larson-Parker? |
SQL Query: SELECT TOTAL(price) as result FROM products WHERE company_name = 'Larson-Parker' |
Natural Query: How many orders were placed for Michael-Estes between 2023-10-27 and 2024-02-06? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Michael-Estes' AND order_date BETWEEN '2023-10-27' AND '2024-02-06' |
Natural Query: Show me all products in the beat category with a price over $231.62. |
SQL Query: SELECT * FROM products WHERE category = 'beat' AND price > 231.62 |
Natural Query: How many orders were placed for Gomez, Allen and Jackson between 2023-09-22 and 2023-10-22? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Gomez, Allen and Jackson' AND order_date BETWEEN '2023-09-22' AND '2023-10-22' |
Natural Query: List all products of Harris Inc ordered by stock_quantity from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Harris Inc' ORDER BY stock_quantity ASC |
Natural Query: List all customers and their total order value for Scott 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 = 'Scott PLC' GROUP BY c.customer_id |
Natural Query: What is the average price of all products for Welch LLC? |
SQL Query: SELECT AVERAGE(price) as result FROM products WHERE company_name = 'Welch LLC' |
Natural Query: How many orders were placed for Jenkins Inc between 2024-07-14 and 2024-08-05? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jenkins Inc' AND order_date BETWEEN '2024-07-14' AND '2024-08-05' |
Natural Query: How many orders were placed for Lam-Cochran between 2024-01-13 and 2024-03-18? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lam-Cochran' AND order_date BETWEEN '2024-01-13' AND '2024-03-18' |
Natural Query: What are the top 7 products by revenue for Sexton, Holt and Chambers this year? |
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Sexton, Holt and Chambers' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 7 |
Natural Query: What is the total profit for each supplier in Gay-Carr? |
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Gay-Carr' GROUP BY supplier ORDER BY total_profit DESC |
Natural Query: Show me all products in the anything category with a price over $818.89. |
SQL Query: SELECT * FROM products WHERE category = 'anything' AND price > 818.89 |
Natural Query: Show me all products in the father category with a price over $90.99. |
SQL Query: SELECT * FROM products WHERE category = 'father' AND price > 90.99 |
Natural Query: List all products of Moore, Lewis and Saunders ordered by rating from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Moore, Lewis and Saunders' ORDER BY rating DESC |
Natural Query: What is the total sales for each category in Smith Ltd? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.