diff --git a/src/main/resources/mapper/MemberMapper.xml b/src/main/resources/mapper/MemberMapper.xml index b40214f..7f77847 100644 --- a/src/main/resources/mapper/MemberMapper.xml +++ b/src/main/resources/mapper/MemberMapper.xml @@ -316,7 +316,7 @@ FROM member m LEFT JOIN class_member_mapping cm ON cm.member_id = m.id - LEFT JOIN ( SELECT member_id, count( 1 ) AS ts FROM exercise_done_result WHERE score >= 60 GROUP BY class_id ) AS r ON r.member_id = m.id + LEFT JOIN ( SELECT member_id, count( 1 ) AS ts, class_id FROM exercise_done_result WHERE score >= 60 GROUP BY class_id ) AS r ON r.member_id = m.id AND r.class_id = cm.class_id WHERE cm.class_id = #{classId} AND r.ts is NULL