사업자별 통계 - 일별/월별 통계 데이터 sum 항목 추가

This commit is contained in:
kimjhjjang
2022-12-08 14:07:05 +09:00
parent 523d80f565
commit 9dc9aa7f7a

View File

@@ -586,19 +586,19 @@
, t1.BIZRNO AS bizrno , t1.BIZRNO AS bizrno
, SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt , SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt , SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS succCnt
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt , TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as succRt
, t2.sndCntS , SUM(t2.sndCntS) AS sndCntS
, t2.succCntS , SUM(t2.succCntS) AS succCntS
, t2.succRtS , SUM(t2.succRtS) AS succRtS
, t2.sndCntL , SUM(t2.sndCntL) AS sndCntL
, t2.succCntL , SUM(t2.succCntL) AS succCntL
, t2.succRtL , SUM(t2.succRtL) AS succRtL
, t2.sndCntM , SUM(t2.sndCntM) AS sndCntM
, t2.succCntM , SUM(t2.succCntM) AS succCntM
, t2.succRtM , SUM(t2.succRtM) AS succRtM
, t2.sndCntR , SUM(t2.sndCntR) AS sndCntR
, t2.succCntR , SUM(t2.succCntR) AS succCntR
, t2.succRtR , SUM(t2.succRtR) AS succRtR
from ( from (
<!-- 추가분 (시작) --> <!-- 추가분 (시작) -->
SELECT SELECT
@@ -779,14 +779,14 @@
, t1.BIZRNO AS bizrno , t1.BIZRNO AS bizrno
, SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt , SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS sndCnt
, CONCAT(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR),'(',(TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2)),'%)') AS succCnt , CONCAT(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR),'(',(TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2)),'%)') AS succCnt
, t2.sndCntS , SUM(t2.sndCntS)
, CONCAT(t2.succCntS, '(', t2.succRtS, '%)') AS succCntS , CONCAT(SUM(t2.succCntS), '(', SUM(t2.succRtS), '%)') AS succCntS
, t2.sndCntL , SUM(t2.sndCntL)
, CONCAT(t2.succCntL, '(', t2.succRtL, '%)') AS succCntL , CONCAT(SUM(t2.succCntL), '(', SUM(t2.succRtL), '%)') AS succCntL
, t2.sndCntM , SUM(t2.sndCntM)
, CONCAT(t2.succCntM, '(', t2.succRtM, '%)') AS succCntM , CONCAT(SUM(t2.succCntM), '(', SUM(t2.succRtM), '%)') AS succCntM
, t2.sndCntR , SUM(t2.sndCntR)
, CONCAT(t2.succCntR, '(', t2.succRtR, '%)') AS succCntR , CONCAT(SUM(t2.succCntR), '(', SUM(t2.succRtR), '%)') AS succCntR
from ( from (
select SUM_YM select SUM_YM
, USER_SEQ , USER_SEQ
@@ -1006,19 +1006,19 @@
, t1.BIZRNO AS BIZRNO , t1.BIZRNO AS BIZRNO
, SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT , SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT , SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) AS SUCC_CNT
, TRUNCATE((t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / (t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT , TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2) as SUCC_RT
, t2.sndCntS as SND_CNT_S , SUM(t2.sndCntS) as SND_CNT_S
, t2.succCntS as SUCC_CNT_S , SUM(t2.succCntS) as SUCC_CNT_S
, t2.succRtS as SUCC_RT_S , SUM(t2.succRtS) as SUCC_RT_S
, t2.sndCntL as SND_CNT_L , SUM(t2.sndCntL) as SND_CNT_L
, t2.succCntL as SUCC_CNT_L , SUM(t2.succCntL) as SUCC_CNT_L
, t2.succRtL as SUCC_RT_L , SUM(t2.succRtL) as SUCC_RT_L
, t2.sndCntM as SND_CNT_M , SUM(t2.sndCntM) as SND_CNT_M
, t2.succCntM as SUCC_CNT_M , SUM(t2.succCntM) as SUCC_CNT_M
, t2.succRtM as SUCC_RT_M , SUM(t2.succRtM) as SUCC_RT_M
, t2.sndCntR as SND_CNT_R , SUM(t2.sndCntR) as SND_CNT_R
, t2.succCntR as SUCC_CNT_R , SUM(t2.succCntR) as SUCC_CNT_R
, t2.succRtR as SUCC_RT_R , SUM(t2.succRtR) as SUCC_RT_R
from ( from (
<!-- 추가분 (시작) --> <!-- 추가분 (시작) -->
SELECT SELECT
@@ -1199,14 +1199,14 @@
, t1.BIZRNO AS BIZRNO , t1.BIZRNO AS BIZRNO
, SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT , SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) AS SND_CNT
, CONCAT(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR),'(',(TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2)) , '%)') AS SUCC_CNT , CONCAT(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR),'(',(TRUNCATE(SUM(t2.succCntS + t2.succCntL + t2.succCntM + t2.succCntR) / SUM(t2.sndCntS + t2.sndCntL + t2.sndCntM + t2.sndCntR) * 100, 2)) , '%)') AS SUCC_CNT
, t2.sndCntS as SND_CNT_S , SUM(t2.sndCntS) as SND_CNT_S
, CONCAT(t2.succCntS,'(', t2.succRtS, '%)') as SUCC_CNT_S , CONCAT(SUM(t2.succCntS),'(', SUM(t2.succRtS), '%)') as SUCC_CNT_S
, t2.sndCntL as SND_CNT_L , SUM(t2.sndCntL) as SND_CNT_L
, CONCAT(t2.succCntL, '(', t2.succRtL, '%)') as SUCC_CNT_L , CONCAT(SUM(t2.succCntL), '(', SUM(t2.succRtL), '%)') as SUCC_CNT_L
, t2.sndCntM as SND_CNT_M , SUM(t2.sndCntM) as SND_CNT_M
, CONCAT(t2.succCntM, '(', t2.succRtM, '%)') as SUCC_CNT_M , CONCAT(SUM(t2.succCntM), '(', SUM(t2.succRtM), '%)') as SUCC_CNT_M
, t2.sndCntR as SND_CNT_R , SUM(t2.sndCntR) as SND_CNT_R
, CONCAT(t2.succCntR, '(', t2.succRtR, '%)') as SUCC_CNT_R , CONCAT(SUM(t2.succCntR), '(', SUM(t2.succRtR), '%)') as SUCC_CNT_R
from ( from (
<!-- 추가분 (시작) --> <!-- 추가분 (시작) -->
SELECT SELECT