I have a table of student applications.
studentID
class
status
Students are allowed to apply for more than one class. So each student will have multiple records in the table. The status column will have a value of 'approved', 'declined' or 'awaiting review'.
I need to select all of the students that have not been approved for ANY classes.
I have this query which selects all of the students who have been approved for at least one class:
SELECT DISTINCT * FROM applications WHERE status = 'approved'
Is there a way to select the opposite of the above query? I tried:
SELECT DISTINCT * FROM applications WHERE NOT (status = 'approved')
but that just selects all the records where status doesn't = approved.... which doesn't help me....
can someone suggest a query that will select all of the students that have not been approved for ANY classes?
any help would be great....
thanks...