修改优化流量统计时间段及排序问题

This commit is contained in:
zhanghongqing
2018-10-22 17:37:25 +08:00
parent 4fb18a6f31
commit 4ae042c2f2
7 changed files with 29 additions and 29 deletions

View File

@@ -18,7 +18,7 @@
<select id="appChart" resultType="java.util.HashMap">
SELECT app_type appType, SUM(link_num) count, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
FROM galaxy.traffic_app_statistic
WHERE app_type !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic WHERE app_type != 0),INTERVAL 5 MINUTE)
WHERE app_type !=0 and stat_time = (SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic WHERE app_type != 0)
GROUP BY app_type order by count desc limit 0,10
</select>
</mapper>