创建数据表语句
数据表数据
对上述数据进行TopN排名
select severity,sum(count) as sum from widgt_23 where insertTstamp>='2016-12-05 17:40:00' and insertTstamp<='2016-12-05 18:00:00' group by binary(severity) order by sum desc limit 10;
获取趋势图数据
select * from widgt_23 where insertTstamp>='2016-12-05 17:40:00' and insertTstamp<='2016-12-05 18:00:00' and severity=binary('Info') ;
转载请标明出处:http://www.cnblogs.com/ssslinppp/