SQL Practice Questions
1. Display all columns from the Customers table.
2. Show customer names and emails only.
3. Find customers who live in Hyderabad.
4. List products with price greater than 500.
5. Find customers whose name starts with 'S'.
6. Display employees whose salary is between 30,000 and 60,000.
7. Show orders where total_amount is NULL.
8. List all distinct product categories.
9. Display customers ordered by created_at (latest first).
10. Show only top 5 most recent orders.
11. Find the total number of customers.
12. Calculate the average salary of employees.
13. Find the total sales amount from all orders.
14. Show department-wise employee count.
15. Find the maximum product price in each category.
16. Display order details with customer names.
17. List orders along with employee names who handled them.
18. Show all customers and their orders, including customers with no orders.
19. List all products and their order quantities, including products not ordered.
20. Display employees along with their manager names.
21. Find employees who earn more than their managers.
22. Show order_id, customer_name, product_name, and quantity.
23. Find total quantity sold per product.
24. Display employee name and department name.
25. List customers who ordered products in the Electronics category.
26. Find employees whose salary is greater than the average salary.
27. List customers who have placed at least one order.
28. Find products whose price is higher than the maximum order total.
29. Display employees who work in the department located in Bangalore.
30. Find customers who placed the highest total order amount.