@Query(value="select CLIENT_IP,TRANS_CNT,MOBILE_CNT,cast (round(TRANS_AVAIL_CNT/TRANS_CNT*100,2) as numeric (18,2)) as RATE,cast (TRANS_TIME_SUM/TRANS_CNT as numeric (18,2))as TIME_AVG from (select CLIENT_IP,TRANS_CNT,MOBILE_CNT,TRANS_AVAIL_CNT,TRANS_TIME_SUM,rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a where rank =1 order by TRANS_CNT desc limit 10",nativeQuery=true)
List<Object[]>userIp();
//用户IP分析:TOP10当月1号到当前时间
//用户IP分析:当月1号到当前时间
@Query(value="select CLIENT_IP,TRANS_CNT,MOBILE_CNT,cast (round(TRANS_AVAIL_CNT/TRANS_CNT*100,2) as numeric (18,2)) as RATE,cast (TRANS_TIME_SUM/TRANS_CNT as numeric (18,2))as TIME_AVG from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') order by TRANS_CNT desc limit 10",nativeQuery=true)
List<Object[]>userIpMonth();
//用户IP业务分布:TOP10实时
@Query(value="SELECT \n"+
"sum(decode(TRANS_NAME_NEW,'宽带开户',cnt1,0)) as CNT1,"+
"sum(decode(TRANS_NAME_NEW,'资料变更',cnt1,0)) as CNT2,"+
"sum(decode(TRANS_NAME_NEW,'产品变更',cnt1,0)) as CNT3,"+
"sum(decode(TRANS_NAME_NEW,'套餐变更',cnt1,0)) as CNT4,"+
"sum(decode(TRANS_NAME_NEW,'综合账单查询',cnt1,0)) as CNT5,"+
"sum(decode(TRANS_NAME_NEW,'充值缴费',cnt1,0)) as CNT6,"+
"sum(decode(TRANS_NAME_NEW,'资金变化查询',cnt1,0)) as CNT7,"+
"sum(decode(TRANS_NAME_NEW,'详单查询',cnt1,0)) as CNT8,"+
"sum(decode(TRANS_NAME_NEW,'积分查询',cnt1,0)) as CNT9,"+
"sum(decode(TRANS_NAME_NEW,'其他',cnt1,0)) as CNT10,"+
"CLIENT_IP,CNT from"+
" (SELECT A.CLIENT_IP,TRANS_NAME_NEW,cnt1,cnt FROM "+
"(SELECT CLIENT_IP,TRANS_NAME_NEW,sum(TRANS_CNT) as cnt1 FROM "+
"(select CLIENT_IP,TRANS_CNT,TRANS_NAME_NEW,"+
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a "+
"WHERE rank=1 group by CLIENT_IP,TRANS_NAME_NEW)A,"+
"(SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM "+
"(select CLIENT_IP,TRANS_CNT,"+
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a "+
"WHERE rank=1 group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)B WHERE A.CLIENT_IP=B.CLIENT_IP)A group by CLIENT_IP,CNT ORDER BY CNT DESC",nativeQuery=true)
//用户IP业务分布:实时
@Query(value="SELECT CNT1, CNT2, CNT3, CNT4, CNT5, CNT6, CNT7, CNT8, CNT9, CNT10, CLIENT_IP, CNT FROM ccolap.YONGHU_TMP ORDER BY CNT DESC",nativeQuery=true)
List<Object[]>ipBusiness();
//用户IP业务分布:TOP10当月1号到当前时间
@Query(value="SELECT \n"+
"sum(decode(TRANS_NAME_NEW,'宽带开户',cnt1,0)) as CNT1,"+
"sum(decode(TRANS_NAME_NEW,'资料变更',cnt1,0)) as CNT2,"+
"sum(decode(TRANS_NAME_NEW,'产品变更',cnt1,0)) as CNT3,"+
"sum(decode(TRANS_NAME_NEW,'套餐变更',cnt1,0)) as CNT4,"+
"sum(decode(TRANS_NAME_NEW,'综合账单查询',cnt1,0)) as CNT5,"+
"sum(decode(TRANS_NAME_NEW,'充值缴费',cnt1,0)) as CNT6,"+
"sum(decode(TRANS_NAME_NEW,'资金变化查询',cnt1,0)) as CNT7,"+
"sum(decode(TRANS_NAME_NEW,'详单查询',cnt1,0)) as CNT8,"+
"sum(decode(TRANS_NAME_NEW,'积分查询',cnt1,0)) as CNT9,"+
"sum(decode(TRANS_NAME_NEW,'其他',cnt1,0)) as CNT10,"+
"CLIENT_IP,CNT from"+
" (SELECT A.CLIENT_IP,TRANS_NAME_NEW,cnt1,cnt FROM "+
"(SELECT CLIENT_IP,TRANS_NAME_NEW,sum(TRANS_CNT) as cnt1 FROM "+
"ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate,'mm') "+
"group by CLIENT_IP,TRANS_NAME_NEW)A,"+
"(SELECT CLIENT_IP,sum(TRANS_CNT) as CNT FROM "+
"(select CLIENT_IP,TRANS_CNT,"+
"rank()over(order by STATS_TIME desc) as rank from ccolap.app_sm_db_client_kpi_250_t where STATS_TIME>=trunc(sysdate))a "+
"WHERE rank=1 group by CLIENT_IP ORDER BY CNT DESC LIMIT 10)B WHERE A.CLIENT_IP=B.CLIENT_IP)A group by CLIENT_IP,CNT ORDER BY CNT DESC",nativeQuery=true)
@Query(value="SELECT CNT1,\n"+
"CNT2,\n"+
"CNT3,\n"+
"CNT4,\n"+
"CNT5,\n"+
"CNT6,\n"+
"CNT7,\n"+
"CNT8,\n"+
"CNT9,\n"+
"CNT10,\n"+
"CLIENT_IP,\n"+
"CNT FROM ccolap.YONGHU_OLD_TMP ORDER BY CNT DESC",nativeQuery=true)