修改优化流量统计时间段及排序问题
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user