I have a table and I want to pull two fields from them - student_id and test_id. But I only want to pull the records of student_ids that have 11 unqiue test_ids.
Right now my SQL code is:
SELECT DISTINCT Student_id, Test_ID from Student_results ORDER BY Student_ID
This pulls all the records but how can I pull only the records where count of test_id = 11? So, in english, I would like to view all the student_ids that have 11 unique test_ids.
Thanks in advance.