@Select("select t.studentId,t.studentName,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId where t.clazz=#{clazz} GROUP BY t.studentId order by sum(etScore) desc")
@Select("select t.studentId,t.studentName,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId where t.clazz=#{clazz} GROUP BY t.studentId order by sum(etScore) desc")
@Select("<script> select t.studentId,t.studentName,t.clazz as clazz,count(s.studentId) as count,IFNULL(sum(etScore),0) as countsum from student t left join score s on s.studentId = t.studentId"
+"<if test='clazz != \"null\"'>"
+"where t.clazz=#{clazz}"
+"</if>"
+"GROUP BY t.studentId order by sum(etScore) desc"