수정건 수정

This commit is contained in:
USER
2022-08-03 17:40:17 +09:00
parent abb5db5b97
commit 811986fa6d
24 changed files with 327 additions and 161 deletions

View File

@@ -214,6 +214,7 @@
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
/* attractMgt-mapper.xml(selectSndCountList) */
SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
, ecm.SND_CNT
, ecm.SUCC_CNT
@@ -351,6 +352,7 @@
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto"
resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
/* attractMgt-mapper.xml(sendNumberListExcel) */
SELECT DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS SUM_YM
, ecm.SND_CNT
, S.SND_CNT AS SND_CNT_S

View File

@@ -234,4 +234,39 @@
WHERE
OPRTR_ID = #{oprtrId}
</update>
<select id="getAuthNumList" parameterType="kr.co.uplus.ez.api.login.dto.AuthNum" resultType="kr.co.uplus.ez.api.login.dto.AuthNum">
/* login-mapper.xml(getAuthNumList) */
SELECT
T2.SEQ_NO
,T1.OPRTR_ID
,T1.AUTHCHR_FAIL_CNT
,T2.AUTH_TP_CD
,T2.STTUS_CD
,T2.HP_NO
,T2.CHR_VAL
,T2.EXP_DT
,T2.REG_DT
,T2.REG_ID
,T2.CHG_ID
,T2.CHG_DT
FROM hubez_admin.EZ_ADM_USER T1
LEFT JOIN hubez_common.EZ_AUTH_CHR T2
ON T1.OPRTR_ID = T2.REG_ID
AND T1.HP_NO = T2.HP_NO
WHERE 1=1
<if test="regDt != null and regDt != ''">
AND T2.REG_DT >= DATE_SUB(#{regDt}, INTERVAL #{searchTime} MINUTE)
</if>
<if test="hpNo != null and hpNo != ''">
AND T2.HP_NO = #{hpNo}
</if>
<if test="sttusCd != null and sttusCd != ''">
AND T2.STTUS_CD = #{sttusCd}
</if>
<if test="authTpCd != null and authTpCd != ''">
AND T2.AUTH_TP_CD = #{authTpCd}
</if>
</select>
</mapper>

View File

@@ -115,7 +115,7 @@
, 0 as FB_SUCC_CNT
FROM hubez_common.EZ_WEB_MSG
WHERE 1=1
AND CH_STR = 'SMS'
AND CH_STR = #{chStr}
<if test='reqType != null and reqType != ""'>
<if test='reqType eq "M"'>
<![CDATA[
@@ -141,7 +141,7 @@
, SUM(IFNULL(FB_SUCC_CNT,0)) AS FB_SUCC_CNT
FROM hubez_common.EZ_WEB_MSG
WHERE 1=1
AND FB_CH_STR = 'SMS'
AND FB_CH_STR = #{chStr}
<if test='reqType != null and reqType != ""'>
<if test='reqType eq "M"'>
<![CDATA[

View File

@@ -205,64 +205,49 @@
</sql>
<select id="selectMsgBlckwordListTotalCnt" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="int">
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
SELECT
COUNT(*) AS TOTAL_CNT
FROM
hubez_common.EZ_MSG_BLCKWORD emb
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
ON emb.SEQ_NO = ebd.SEQ_NO
/* riskMgt-mapper.xml(selectMsgBlckwordListTotalCnt) */
SELECT COUNT(*) AS TOTAL_CNT
FROM hubez_common.EZ_MSG_BLCKWORD emb
WHERE 1 = 1
<include refid="msgBlckwordListCondition"/>
</select>
<select id="selectMsgBlckwordList" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpList">
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, A.*
FROM
(
SELECT
emb.SEQ_NO
, ebd.WORD
, (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=emb.BLCK_YN) AS BLCK_YN
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
,(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SNDBLCK_RSN_CD'
AND DTL_CD = emb.BLCK_RSN_CD) AS BLCK_RSN_CD
, emb.REG_ID
FROM
hubez_common.EZ_MSG_BLCKWORD emb
LEFT OUTER JOIN hubez_common.EZ_BLCKWORD_DTL ebd
ON emb.SEQ_NO = ebd.SEQ_NO
WHERE 1 = 1
<include refid="msgBlckwordListCondition"/>
ORDER BY emb.CHG_DT DESC
LIMIT #{page}, #{pagePerRows} ) A
,( SELECT @ROWNUM := #{page} ) AS R;
/* riskMgt-mapper.xml(selectMsgBlckwordList) */
select @ROWNUM := @ROWNUM + 1 AS NO
, A.SEQ_NO
, ( select case when char_length(GROUP_CONCAT(WORD)) > 12 then concat(substr(GROUP_CONCAT(WORD) , 1, 12),'...')
else GROUP_CONCAT(WORD)
end
from hubez_common.EZ_BLCKWORD_DTL
where SEQ_NO = A.SEQ_NO
) as WORD
, (select DTL_CD_NM from hubez_common.EZ_CD_DTL where GRP_CD = 'SNDBLCK_YN_CD' and DTL_CD = A.BLCK_YN ) as BLCK_YN
, DATE_FORMAT(A.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
, (select DTL_CD_NM from hubez_common.EZ_CD_DTL where GRP_CD = 'SNDBLCK_RSN_CD' and DTL_CD = A.BLCK_RSN_CD ) as BLCK_RSN_CD
, A.REG_ID
from (
select emb.SEQ_NO
, emb.BLCK_YN
, emb.BLCK_RSN_CD
, emb.REG_ID
, emb.CHG_DT
from hubez_common.EZ_MSG_BLCKWORD emb
where 1 = 1
<include refid="msgBlckwordListCondition"/>
ORDER BY emb.CHG_DT DESC
LIMIT #{page}, #{pagePerRows} ) A ,( SELECT @ROWNUM := #{page} ) AS R
</select>
<sql id="msgBlckwordListCondition">
<sql id="msgBlckwordListCondition">
<if test="regId != null and regId != ''">
AND UPPER(emb.REG_ID) LIKE UPPER(CONCAT('%', #{regId}, '%'))
AND emb.REG_ID LIKE CONCAT('%', #{regId}, '%')
</if>
<if test="blckRsnCd != null and blckRsnCd != ''">
AND emb.BLCK_RSN_CD = #{blckRsnCd}
</if>
<if test="word != null and word != ''">
AND UPPER(ebd.WORD) LIKE UPPER(CONCAT('%', #{word}, '%'))
and emb.SEQ_NO in (select SEQ_NO from hubez_common.EZ_BLCKWORD_DTL where WORD like CONCAT('%', #{word}, '%'))
</if>
</sql>

View File

@@ -25,7 +25,7 @@
from (
SELECT SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -47,7 +47,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -70,7 +70,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -93,7 +93,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -116,7 +116,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
@@ -143,7 +143,7 @@
SELECT SUM_YM
, SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -167,7 +167,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -192,7 +192,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -217,7 +217,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -242,7 +242,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_MON_STAT
WHERE 1=1
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
@@ -273,7 +273,7 @@
from (
SELECT SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -318,7 +318,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -341,7 +341,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -364,7 +364,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
@@ -391,7 +391,7 @@
SELECT SUM_YMD
, SUM(IFNULL(SND_CNT,0)) AS T_SND_CNT
,SUM(IFNULL(SUCC_CNT,0)) AS T_SUCC_CNT
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
,TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS T_SUCC_RT
, 0 as S_SND_CNT
, 0 as S_SUCC_CNT
, 0 as S_SUCC_RT
@@ -415,7 +415,7 @@
, 0 as T_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS S_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS S_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS S_SUCC_RT
, 0 as L_SND_CNT
, 0 as L_SUCC_CNT
, 0 as L_SUCC_RT
@@ -440,7 +440,7 @@
, 0 as S_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS L_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS L_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS L_SUCC_RT
, 0 as M_SND_CNT
, 0 as M_SUCC_CNT
, 0 as M_SUCC_RT
@@ -465,7 +465,7 @@
, 0 as L_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS M_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS M_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS M_SUCC_RT
, 0 as A_SND_CNT
, 0 as A_SUCC_CNT
, 0 as A_SUCC_RT
@@ -490,7 +490,7 @@
, 0 as M_SUCC_RT
, SUM(IFNULL(SND_CNT,0)) AS A_SND_CNT
, SUM(IFNULL(SUCC_CNT,0)) AS A_SUCC_CNT
, ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
, TRUNCATE((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100), 2) AS A_SUCC_RT
FROM hubez_common.EZ_DAY_STAT
WHERE 1=1
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
@@ -521,7 +521,7 @@
, t1.BIZRNO AS bizrno
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as succRt
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt
, t2.sndCntS
, t2.succCntS
, t2.succRtS
@@ -576,7 +576,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -585,7 +585,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -594,7 +594,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -603,7 +603,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -674,7 +674,7 @@
, t1.BIZRNO AS bizrno
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as succRt
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt
, t2.sndCntS
, t2.succCntS
, t2.succRtS
@@ -728,7 +728,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -737,7 +737,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -746,7 +746,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -755,7 +755,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -846,7 +846,7 @@
, t1.BIZRNO AS BIZRNO
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as SUCC_RT
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT
, t2.sndCntS as SND_CNT_S
, t2.succCntS as SUCC_CNT_S
, t2.succRtS as SUCC_RT_S
@@ -901,7 +901,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -910,7 +910,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -919,7 +919,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -928,7 +928,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (
@@ -999,7 +999,7 @@
, t1.BIZRNO AS BIZRNO
, (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, (t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT
, round((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR), 2) as SUCC_RT
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT
, t2.sndCntS as SND_CNT_S
, t2.succCntS as SUCC_CNT_S
, t2.succRtS as SUCC_RT_S
@@ -1053,7 +1053,7 @@
, case when sndChCd = 'SMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as smsSuccCnt
, case when sndChCd = 'SMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'SMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as smsSuccRt
, case when sndChCd = 'LMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1062,7 +1062,7 @@
, case when sndChCd = 'LMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as lmsSuccCnt
, case when sndChCd = 'LMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'LMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as lmsSuccRt
, case when sndChCd = 'MMS' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1071,7 +1071,7 @@
, case when sndChCd = 'MMS' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as mmsSuccCnt
, case when sndChCd = 'MMS' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'MMS' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as mmsSuccRt
, case when sndChCd = 'ALIMTALK' then SUM(SND_CNT) + SUM(FBACK_CNT)
@@ -1080,7 +1080,7 @@
, case when sndChCd = 'ALIMTALK' then SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)
else 0
end as alimtSuccCnt
, case when sndChCd = 'ALIMTALK' then ROUND((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)), 2)
, case when sndChCd = 'ALIMTALK' then TRUNCATE((SUM(SUCC_CNT) + SUM(FBACK_SUCC_CNT)) / (SUM(SND_CNT) + SUM(FBACK_CNT)) * 100, 2)
else 0
end as alimtSuccRt
from (