Crear courses_x_students en base a las matriculas de course_link

SELECT
 course_aula_id aula_id,
 e.student_id,
 l.course_id,
 e.enroll_id,
 g.enroll_grade_id
FROM
cl_courses_x_aulas_link l
JOIN cl_students_enroll e ON
    e.area_id = l.area_id AND e.ciclo_id = l.ciclo_id AND e.term_id = l.term_id AND e.section_id = l.section_id
JOIN cl_students_enrollment_grades g ON
    g.course_id = l.course_id AND g.enroll_id = e.enroll_id
WHERE course_aula_id = 2156;