谁有爱立信的取指标用的sql语句啊,给我发一份,谢谢。
谁有爱立信的取指标用的sql语句啊,给我发一份,谢谢。
SELECT
celtchf.object_id AS cell_id,
Left((celtchf.EXCHID),7) AS BSC,
celtchf.`date`,
celtchf.period,
celtchfp.tfestpgsm1 AS T_CongS_Nho,
Sum(CELTCHF.TFCONGSHO + CELTCHH.THCONGSHO + CELTCHFP.TFESTPGSM1) AS T_CongS_Ho,
round(100*(CELTCHF.TFCONGSHO + CELTCHH.THCONGSHO + CELTCHFP.TFESTPGSM1)/(TFCALLS+THCALLS),4) as t_congs_r,
round(CELTCHF.TFTRALACC/CELTCHF.TFNSCAN,2) AS Erl_F,
ROUND(CELTCHH.THTRALACC/CELTCHH.THNSCAN,2) AS Erl_H,
ROUND(CELTCHF.TFTRALACC/CELTCHF.TFNSCAN+CELTCHH.THTRALACC/CELTCHH.THNSCAN,2) AS T_Erl,
round(CASE WHEN (CLTCH.TAVAACC/CLTCH.TAVASCAN)=0 THEN 0 ELSE ((CELTCHF.TFTRALACC+CELTCHH.THTRALACC)/CELTCHF.TFNSCAN)/(CLTCH.TAVAACC/CLTCH.TAVASCAN)END,2) AS p_erl,
round(CLTCH.TAVAACC/CLTCH.TAVASCAN ,2) AS tch_ava,
round(100*cltch.tcassall/cltch.tassall,4) AS t_SUCC_r,
cltch.tassall,
cltch.tcassall,
(cltch.tassall-cltch.tcassall) AS T_AS_FIAL,
cltch.tnuchcnt,
round(100*(CLTCH.TAVAACC/CLTCH.TAVASCAN) /cltch.tnuchcnt,2) AS tch_ava_r,
celtchfp.tfcongpgs4 AS tch_drop,
clsdcch.cndrop,
clsdcch.cnrelcong,
Sum(clsdcch.cndrop-clsdcch.cnrelcong) AS sd_drop,
round(CLSDCCH.CAVAACC/CLSDCCH.CAVASCAN,2) AS sd_ava,
(CLSDCCH.CCONGS-CLTCH.TCHSIG) AS SD_CONGS,
randomacc.cnrocnt,
randomacc.raaccfa,
(RANDOMACC.CNROCNT + RANDOMACC.RAACCFA) AS RA_SUM,
RANDOMACC.CNROCNT AS RA_SUCC_SUM,
100*RANDOMACC.CNROCNT/(RANDOMACC.CNROCNT + RANDOMACC.RAACCFA) AS RA_SUCC_R
cltchdrf.TFDISTA AS TFTADR,
(cltchdrf.TFSUDLOS -cltchdrf.tfsudloss1) AS TFSUDDR,
(cltchdrf.TFDISSDL+cltchdrf.TFDISSDLS2) AS TFSDLDR,
(cltchdrf.TFDISSUL+cltchdrf.TFDISSULS3) AS TFSULDR,
(cltchdrf.TFDISSBL+cltchdrf.TFDISSBLS4) AS TFSBLDR,
(cltchdrf.TFDISQADL+cltchdrf.TFDISQADL5) AS TFQADDR,
(cltchdrf.TFDISQAUL+cltchdrf.TFDISQAUL6) AS TFQAUDR,
(cltchdrf.TFDISQABL+cltchdrf.TFDISQABL7) AS TFQABDR,
FROM
celtchfp
Inner Join celtchf ON celtchfp.object_id = celtchf.object_id AND celtchfp.`date` = celtchf.`date` AND celtchfp.period = celtchf.period
Inner Join celtchh ON celtchf.object_id = celtchh.object_id AND celtchf.`date` = celtchh.`date` AND celtchf.period = celtchh.period
Inner Join cltch ON celtchh.object_id = cltch.object_id AND celtchh.`date` = cltch.`date` AND celtchh.period = cltch.period
Inner Join clsdcch ON cltch.object_id = clsdcch.object_id AND cltch.`date` = clsdcch.`date` AND cltch.period = clsdcch.period
Inner Join randomacc ON clsdcch.object_id = randomacc.object_id AND clsdcch.`date` = randomacc.`date` AND clsdcch.period = randomacc.period
Inner Join cltchdrf ON randomacc.object_id =cltchdrf.object_id AND randomacc.`date` =cltchdrf.`date` AND randomacc.period=cltchdrf.period
AND celtchf.`date` >= '090720'
AND celtchf.period = '2000-2100'
AND celtchf.object_id like 'WH3685A'
GROUP BY CELTCHF.OBJECT_ID,celtchf.EXCHID,CELTCHF.DATE,CELTCHF.PERIOD
先发点,大概就是这些语句组成的,如有需要,留个邮箱。
邮箱都不留一个
不清楚
不是都直接FTP原始文件,然后计算吗