Task: Text to Code
Input (English): Step 1: For each row in Student_Course_Enrolment table, find corresponding rows in Students table and in Courses table.
Step 2: find date_of_latest_logon of the results of step 1 whose course_name equals Fail
Output (English): SELECT T1.date_of_latest_logon FROM Students AS T1 JOIN Courses AS T2 JOIN Student_Course_Enrolment AS T3 ON T1.student_id = T3.student_id AND T3.course_id = T2.course_id WHERE T2.course_name = "Fail"