DELETE FROM
cl_courses_x_students USING cl_courses_x_students,
cl_courses_x_students e1
WHERE cl_courses_x_students.course_student_id < e1.course_student_id
AND cl_courses_x_students.aula_id = e1.aula_id
AND cl_courses_x_students.group_id = e1.group_id
AND cl_courses_x_students.student_id = e1.student_id
AND e1.aula_id = 2156;