What is the latest test completion date?
select t1.date_of_completion from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id order by t1.date_of_completion desc limit 1
How many students have taken tests?
select count ( distinct student_id ) from student_course_enrolment
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"
When did these failures occur?
select t1.date_of_completion from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id where t2.test_result = "Fail"