Als de leerlinginformatie in de leerlingtabel staat, kan de vraag er als volgt uitzien:
SELECT student_name, student_birth_day, studentnum
FROM Student S
RIGHT JOIN (
SELECT studentnum, count(*) as cnt
FROM Attendance
WHERE (attStatus = 'Yes')
AND (unitCode = 'MMA1034')
GROUP BY studentnum
HAVING (COUNT(*) < 4)
) A
ON A.studentnum = S.studentnum