SQL INNER JOIN Practice Questions
SQL JOIN Practice Questions
1. List all employees and their department names.
2. Find names of employees working in the 'IT' department.
3. List employees and their department location.
4. List departments and how many employees they have.
5. Show employee name, department name, and project name.
6. Show employee names working in projects (using EMP_PROJECT).
7. Find departments where no employees are working.
8. List employees who do not belong to any department.
9. Show employee names and their manager names (self join).
10. List all employees who share the same manager.
11. List project names and department names using JOIN.
12. Find the employees working in more than one project.
13. List all employees with project count they are working on.
14. List all employees along with project names and department names.
15. Find the department name of the employee named 'John'.
16. Show the salary and department name of all employees earning more than 50000.
17. List departments with more than 2 employees.
18. List departments that have employees working on projects.
19. Show project names that have no employees assigned.
20. List employees whose department is located in 'New York'.
21. List the top 3 departments with the highest number of employees.
22. Find the average salary per department.
23. Find employees earning more than the average salary of their department.
24. List employee names, project names, and department names where the department is 'Finance'.
25. Count how many projects each department has.
26. Show each project with the number of employees working on it.
27. Show departments with total project and employee count.
28. Show all employees and their project names, even if they're not assigned to any project.
29. List all departments and their employees, even if no employee is assigned.
SQL INNER JOIN Practice Questions
30. Show all project names and the departments they belong to, even if no department is assigned.
31. Find all employees who have the same salary as someone else.
32. List employees and their colleagues (others in the same department).
33. Show the department name and the highest paid employee in each.
34. List employees with less salary than their manager.
35. List the employee name and department name who earns the maximum salary.