<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qmth.teachcloud.report.business.mapper.TAExamCourseDifficultMapper">

    <select id="findValidAnswerDetail" resultType="com.qmth.teachcloud.report.business.bean.result.CellResult">
        SELECT
            tik.paper_type AS paperType,
            tik.`scope`,
            tik.count,
            tik.interpret,
            round(tik.sch_avg_score_rate * 100,2) as schAvgScoreRate,
            round(tik.col_avg_score_rate * 100,2) as myAvgScoreRate
        from t_a_exam_course_difficult tik
       <where>
           <if test="collegeId != null and collegeId != ''">
               and tik.college_id = #{collegeId}
           </if>
           <if test="examId != null and examId != ''">
               and tik.exam_id = #{examId}
           </if>
           <if test="courseCode != null and courseCode != ''">
               and tik.course_code = #{courseCode}
           </if>
       </where>
    </select>
</mapper>
