यदि छात्र की जानकारी छात्र तालिका में है, तो क्वेरी इस तरह दिख सकती है:
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