码迷,mamicode.com
首页 > 数据库 > 详细

PmException--- SQL(统计报表)

时间:2016-07-11 18:39:33      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

select TAGS,GROUP_CONCAT(TAGS) t 
 from EXCEPTION_RESULT e,PM_TASK t
        where e.TASK_ID=1467859122980 and t.OWNER=admin
        group by TAGS,TIMESTAMP
        order by e.TIMESTAMP DESC;

select GROUP_CONCAT(TAGS) IP,GROUP_CONCAT(TIMESTAMP) t from EXCEPTION_RESULT e,PM_TASK t
        where e.TASK_ID=1467859122980 and t.OWNER=admin and 
        DATE_SUB(CURDATE(), INTERVAL
        6 DAY)<=date(TIMESTAMP)
        group by TAGS,left(TIMESTAMP, 10)
        order by e.TIMESTAMP
        DESC;
 select TAGS,count(TAGS) s,GROUP_CONCAT(TAGS) IP, TIMESTAMP t 
 from EXCEPTION_RESULT e,PM_TASK t
        where e.TASK_ID=1467859122980 and t.OWNER=admin and 
        DATE_SUB(CURDATE(), INTERVAL
        6 DAY)<=date(TIMESTAMP)
        group by TAGS,left(TIMESTAMP, 13)
        order by TAGS 
        DESC;

 

PmException--- SQL(统计报表)

标签:

原文地址:http://www.cnblogs.com/onetwo/p/5660936.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!