IS NOT NULL
WHERE marks IS NOT NULL; rows that actually have a marks value (including 0). Use it when you want ‘exam written’ vs ‘absent’.
COUNT(marks) is similar to counting IS NOT NULL on that column.
Trap — IS NOT NULL and then still using the column in a way that assumes it cannot be 0.
On the example next to this theory: IS NOT NULL: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
Exam tip
WHERE marks IS NOT NULL;