Om elevinformation finns i elevtabellen kan frågan se ut så här:
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