@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)
@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();
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)
@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();
List<Object[]>userIpMonth();
//用户IP业务分布:TOP10实时
//用户IP业务分布:实时
@Query(value="SELECT \n"+
@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)
"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)
List<Object[]>ipBusiness();
List<Object[]>ipBusiness();
//用户IP业务分布:TOP10当月1号到当前时间
//用户IP业务分布:TOP10当月1号到当前时间
@Query(value="SELECT \n"+
@Query(value="SELECT CNT1,\n"+
"sum(decode(TRANS_NAME_NEW,'宽带开户',cnt1,0)) as CNT1,"+
"CNT2,\n"+
"sum(decode(TRANS_NAME_NEW,'资料变更',cnt1,0)) as CNT2,"+
"CNT3,\n"+
"sum(decode(TRANS_NAME_NEW,'产品变更',cnt1,0)) as CNT3,"+
"CNT4,\n"+
"sum(decode(TRANS_NAME_NEW,'套餐变更',cnt1,0)) as CNT4,"+
"CNT5,\n"+
"sum(decode(TRANS_NAME_NEW,'综合账单查询',cnt1,0)) as CNT5,"+
"CNT6,\n"+
"sum(decode(TRANS_NAME_NEW,'充值缴费',cnt1,0)) as CNT6,"+
"CNT7,\n"+
"sum(decode(TRANS_NAME_NEW,'资金变化查询',cnt1,0)) as CNT7,"+
"CNT8,\n"+
"sum(decode(TRANS_NAME_NEW,'详单查询',cnt1,0)) as CNT8,"+
"CNT9,\n"+
"sum(decode(TRANS_NAME_NEW,'积分查询',cnt1,0)) as CNT9,"+
"CNT10,\n"+
"sum(decode(TRANS_NAME_NEW,'其他',cnt1,0)) as CNT10,"+
"CLIENT_IP,\n"+
"CLIENT_IP,CNT from"+
"CNT FROM ccolap.YONGHU_OLD_TMP ORDER BY CNT DESC",nativeQuery=true)
" (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)