<?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.TBModuleConfigMapper">

    <select id="findDistinctModuleInfoByExamIdAndCourseCode"
            resultType="com.qmth.teachcloud.report.business.entity.TBModuleConfig">
        SELECT
            module_type, attribute , max(formula) as formula
        FROM
            t_b_module_config
        WHERE
            exam_id = #{examId} AND course_code = #{courseCode}
        GROUP BY exam_id , course_code , module_type , attribute;
    </select>
</mapper>
