>What's best way to get the following with a SQL statement? I need to be able to get a list of all of the students that have passed three different tests. All of this data is stored in one table with the student id, test description, score and a logical to indicate pass or fail. Each test is stored in a separate record. Thanks in advance.
SELECT student_id;
FROM table_tests;
WHERE pass;
GROUP BY student_id;
HAVING COUNT(*)>=3