How many students failed tests?
SELECT count ( distinct T1.student_id )  FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id   =   T2.registration_id WHERE T2.test_result   =   "Fail"
students failed tests refers to test_result = 'Fail'; counting students refers to COUNT(DISTINCT student_id);