<?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.njcn.prepare.harmonic.mapper.mysql.area.RStatOrgYMapper">

    <select id="selectYlist" resultType="java.util.Map">
        SELECT sum(effective_measurement_accrued) "efSum"
        FROM r_stat_org_y
        WHERE date_format(data_date, '%y%m%d') &gt;= date_format(#{startTime}, '%y%m%d')
          AND date_format(data_date, '%y%m%d') &lt;= date_format(#{endTime}, '%y%m%d')
          AND org_no = #{orgId}
          AND data_type = #{dataTypeId}
        GROUP BY org_no
    </select>

</mapper>