Skip to content
Advertisement

SQL Query Not Getting Results

What I am doing wrong here? Can anyone please help?

1. Use non-correlated sub-query, find the names of employees who are not working on any projects

Answer:

2. Use correlated sub-query, find the names of employees who are not working on any projects.

Answer:

Advertisement

Answer

You can sue the LEFT JOIN as follows for non-correlated sub-query as follows:

Using correlated sub-query

Note: I have considered that the employee record is not available in the project table if the employee has no project assigned.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement