• 计算每分钟交易成功率


    select vdate ,errcnt,succcnt, round(succcnt/(succcnt+errcnt),2) * 100 ||'%' from (select vdate,length(status) - length(replace(status,'失败','-')) as errcnt ,length(status) - length(replace(status,'成功','-')) as succcnt  from (select vdate, listagg(status, ',') within group(order by status) status
      from (select /*+parallel(t 8)*/
             substr(to_char(trans_date, 'yyyy-mm-dd hh24:mi:ss'), 1, 16) as vdate,
             case t.respcode
               when '000000' then
                '成功'
               else
                '失败'
             end as status
              from esb2_trans_log t
            
             where t.trans_date >=
                   to_date('2019-12-18 08:27:00', 'yyyy-mm-dd hh24:mi:ss')
               and t.trans_date <=
                   to_date('2019-12-18 10:39:00', 'yyyy-mm-dd hh24:mi:ss')
               and t.logicsystem = 'COP'
               and t.flowstepid in ('4', 'E')
             order by t.trans_date desc)
    group by vdate
    order by vdate desc ) b ) c
  • 相关阅读:
    Object的公用方法
    Java的特点
    Set集合
    Java语言的三大特性
    List集合
    Collection类
    HashSet
    Codeforces1141F2 Same Sum Blocks (Hard)
    Codeforce1176F Destroy it!
    jzoj 5348. 【NOIP2017提高A组模拟9.5】心灵治愈
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348627.html
Copyright © 2020-2023  润新知