PostgreSQL/RedShift - students that attended zero classes on a given day
SELECT &lt;fields&gt; FROM students LEFT OUTER JOIN class ON classes.studentid =  students.id WHERE classes.id IS NULL - the outer join will output one row per student for each matching class and one row per student with no matching classes, checking for classes.id being NULL will bring out just the output where there was no match.

Lookup how OUTER JOINs work and how they differ from INNER JOINs (note that by default if you don't specify otherwise joins are INNER) for more detail.

As a side note your model does appear to be in normal form: I would expect to have a table for students, a table for classes, and a table for the relationships between the two - your classes tbale appears to mix the latter two which may lead to consistency problems later.