Skip to content
Advertisement

How do I query every person that does not know anyone that takes classes?

I’m struggling with the following SQL problem: I must query all persons that do not know anyone who takes classes, using the following tables:

After a long time trying different queries, the following query is the closest I got to the desired result:

I seem to get more results back than is necessary for this query (Harun, Egbert and John), but I cannot find the mistake I’m making. Can someone please help me out?

Advertisement

Answer

use this:

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