<select id="getYearProcessLog" resultType="java.util.LinkedHashMap">
select
sum(case month(date) when '1' then log_num else 0 end) as "1月",
sum(case month(date) when '2' then log_num else 0 end) as "2月",
sum(case month(date) when '3' then log_num else 0 end) as "3月",
sum(case month(date) when '4' then log_num else 0 end) as "4月",
sum(case month(date) when '5' then log_num else 0 end) as "5月",
sum(case month(date) when '6' then log_num else 0 end) as "6月",
sum(case month(date) when '7' then log_num else 0 end) as "7月",
sum(case month(date) when '8' then log_num else 0 end) as "8月",
sum(case month(date) when '9' then log_num else 0 end) as "9月",
sum(case month(date) when '10' then log_num else 0 end) as "10月",
sum(case month(date) when '11' then log_num else 0 end) as "11月",
sum(case month(date) when '12' then log_num else 0 end) as "12月"
from ota_statistics
where year(date) = #{toyear};
</select>