SELECT *
FROM student_certificates
GROUP BY student_id
HAVING COUNT([DISTINCT] certificate_id) >= 20
Join students
table if some columns from it needed (do not forget to expand GROUP BY expression accordingly).
1
solved sql get query to get any student records who have passed multiple certificates? [closed]