Commit b33bd380 by landerliang@163.com

更改

parent a4845504
......@@ -4,20 +4,20 @@
<select id="getFivesYearStats" resultType="java.util.Map">
SELECT help_type,
(select SUM(total) FROM v_shjz_total where AND `year`='2019') 's2019', (select SUM(total) FROM v_shjz_total where AND `year`='2020') 's2020', (select SUM(total) FROM v_shjz_total where AND `year`='2020') 's2021'
(select SUM(total) FROM v_shjz_total where `year`=${year} AND `help_type`=${help_type})
FROM `v_shjz_total`
WHERE DATE_FORMAT(create_time, '%Y-%m-%d') =
WHERE DATE_FORMAT(createTime, '%Y-%m-%d') =
(SELECT DATE_FORMAT(createTime, '%Y-%m-%d') FROM v_shjz_total ORDER BY createTime DESC LIMIT 1)
GROUP BY
help_type
<!-- SELECT iscity,-->
<!-- SUM(s_2017) 's2017', SUM(s_2018) 's2018', SUM(s_2019) 's2019', SUM(s_2020) 's2020', SUM(s_2021) 's2021'-->
<!-- FROM `v_shjz_achieve`-->
<!-- WHERE DATE_FORMAT(create_time, '%Y-%m-%d') =-->
<!-- (SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM v_shjz_achieve ORDER BY create_time DESC LIMIT 1)-->
<!-- GROUP BY-->
<!-- iscity-->
SELECT iscity,
SUM(s_2017) 's2017', SUM(s_2018) 's2018', SUM(s_2019) 's2019', SUM(s_2020) 's2020', SUM(s_2021) 's2021'
FROM `v_shjz_achieve`
WHERE DATE_FORMAT(create_time, '%Y-%m-%d') =
(SELECT DATE_FORMAT(create_time, '%Y-%m-%d') FROM v_shjz_achieve ORDER BY create_time DESC LIMIT 1)
GROUP BY
iscity
</select>
<select id="getStatsByYear" resultType="java.util.Map">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment