<?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.tuoheng.admin.mapper.QuestionMapper">
    <select id="analyze" resultType="com.tuoheng.admin.entity.vo.QuestionCountVO">
        select q.status,count(q.id) as quantity
        from th_question q
        where q.mission_id=#{missionId}
        group by q.status;
    </select>
    <select id="analyzeType" resultType="com.tuoheng.admin.entity.vo.QuestionTypeCountVO">
        select q.type,count(q.id) as quantity
        from th_question q
        where q.mission_id=#{missionId} and q.status=1
        group by q.type;
    </select>
</mapper>