Can you list the IDs and middle names of all students who have no more than 2 enrollments?
select t1.student_id, t2.middle_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count ( * ) < = 2
What are the dates of enrollment and completion for each of those students? Please list it in the table.
select t1.date_of_enrolment, t1.date_of_completion from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count ( * ) < = 2
What is the full name of the student with the latest date of completion?
select t2.personal_name, t2.middle_name, t2.family_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id order by t1.date_of_completion desc limit 1