Solution
We need students who have enrolled in all prerequisite courses of course 324.
This is a “for all” type query.
In SQL, “for all” is usually written using double NOT EXISTS.
Meaning of option (c):
For a student s, there should not exist any prerequisite course p of course 324 such that the student has not enrolled in that prerequisite course.
So, option (c) checks:
No prerequisite course of 324 is missing from the student's enrollment.
Option (a) uses ANY, so it checks only at least one prerequisite course.
Option (b) uses ALL incorrectly, because one enrollment course cannot be equal to all different prerequisite course IDs at the same time.
Option (d) uses EXISTS, so it checks only at least one matching prerequisite enrollment, not all.