查詢某一支接口,指定時間段的數據 按分鐘排序

--查詢某一支接口,指定時間段的數據 按分鐘排序
select a.servicename,reqdate,substr(reqtime,1,5),count(1)
  from 表名 a
 where servicename = '接口名'
   and reqdate = date '2020-06-28'
   and reqtime >= '16:00:00'
   and reqtime <= '17:00:00'
   group by a.servicename,a.reqdate,substr(a.reqtime,1,5) 
   order by to_date(to_char(a.reqdate,'yyyy-MM-dd ') || substr(a.reqtime,1,5),'yyyy-MM-dd hh24:mi');

--查詢某一支接口,指定時間段的數據 按分鐘排序
select a.servicename,reqdate,substr(reqtime,1,5),count(1)
  from trace a
 where servicename = 'insure'
   and reqdate = date '2020-06-28'
   and reqtime >= '16:00:00'
   and reqtime <= '17:00:00'
   group by a.servicename,a.reqdate,substr(a.reqtime,1,5) 
   order by to_date(to_char(a.reqdate,'yyyy-MM-dd ') || substr(a.reqtime,1,5),'yyyy-MM-dd hh24:mi');
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章