Skip to content
Advertisement

Find departments with no employees

We were given an assignment in class to provide at the minimum two different solutions to find departments, which don’t have any employees. As you can see from below I completed the task successfully.

An additional solution is extra credit, which I like to get. Unfortunately, I can’t think of a third solution and was hoping someone can point me in the right direction. Would something with a MINUS function work?

Below is my setup and 2 working test cases. Any suggestions and help would be greatly appreciated.

Output:

Output:

Advertisement

Answer

You may also use left join as the following:

Also, you may use a sub query as the following:

And with minus you may try:

See a demo.

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