Task: Text to Code
Input (English): SQL: SELECT T2.student_id FROM Student_Course_Registrations AS T1 JOIN Student_Course_Attendance AS T2 ON T1.course_id = T2.course_id ORDER BY T1.registration_date Desc LIMIT 1
Feedback: Make sure course id equals 301 and in step 2 , there should be student course registrations instead of student course attendance .
Output (English): SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1