text stringlengths 0 220 |
|---|
JOIN customers c ON s.customer_id = c.customer_id |
WHERE c.age BETWEEN 25 AND 35 |
AND s.company_name = 'Hughes LLC' |
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 Hale PLC ordered by price from highest to lowest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Hale PLC' ORDER BY price DESC |
Natural Query: What is the total sales for each supplier in Lee Group? |
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Lee Group' GROUP BY supplier ORDER BY total_sales DESC |
Natural Query: How many orders were placed for Jones Inc between 2024-05-23 and 2024-07-18? |
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jones Inc' AND order_date BETWEEN '2024-05-23' AND '2024-07-18' |
Natural Query: List all products of Weaver Ltd ordered by price from lowest to highest. |
SQL Query: SELECT * FROM products WHERE company_name = 'Weaver Ltd' ORDER BY price ASC |
Natural Query: What is the maximum rating of all products for Burnett PLC? |
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Burnett PLC' |
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Valdez-King 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 = 'Valdez-King' |
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) |
GROUP BY p.category |
ORDER BY total_sales DESC |
LIMIT 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.