mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 03:57:56 +09:00
발송통계 > 사업자별통계 GROUP BY USER_SEQ 추가 수정
This commit is contained in:
@@ -609,7 +609,8 @@
|
||||
, ecm.CUST_NM
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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') <!-- <include refid="custMstatListCondition"/> -->
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ <!-- ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ -->
|
||||
) list
|
||||
<!-- 추가분 (시작) -->
|
||||
@@ -700,7 +701,8 @@
|
||||
, ecm.USER_SEQ
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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') <!-- <include refid="custMstatListCondition"/> -->
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -726,7 +728,8 @@
|
||||
, ecm.USER_SEQ
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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') <!-- <include refid="custMstatListCondition"/> -->
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -755,14 +758,14 @@
|
||||
AND #{endMon} = DATE_FORMAT( NOW(), '%Y%m')
|
||||
AND DATE_FORMAT( REG_DT, '%Y-%m') = DATE_FORMAT( NOW(), '%Y-%m')
|
||||
GROUP BY
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m') , ewm.CH_STR
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m'), ewm.USER_SEQ , ewm.CH_STR
|
||||
<!-- 추가분 (끝) -->
|
||||
) t1 group by SUM_YM, USER_SEQ, sndChCd order by null
|
||||
) t2 group by SUM_YM, USER_SEQ order by null
|
||||
) t2 on t2.SUM_YM = t1.SUM_YM and t2.USER_SEQ = t1.USER_SEQ
|
||||
<include refid="custMstatListCondition"/>
|
||||
<!-- <include refid="custMstatListCondition"/> -->
|
||||
GROUP BY t1.BIZRNO, t1.SUM_YM
|
||||
ORDER BY t1.SUM_YM desc, t1.CUST_NM;
|
||||
ORDER BY t1.SUM_YM desc, t1.CUST_NM
|
||||
</select>
|
||||
|
||||
<select id="selectCustMstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList">
|
||||
@@ -793,7 +796,7 @@
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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')
|
||||
<!-- <include refid="custMstatListCondition"/> -->
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ
|
||||
-- ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -885,7 +888,7 @@
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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')
|
||||
<!-- <include refid="custMstatListCondition"/> -->
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -911,7 +914,7 @@
|
||||
from hubez_common.EZ_CUST_MSTAT ecm
|
||||
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')
|
||||
<!-- <include refid="custMstatListCondition"/> -->
|
||||
<include refid="custMstatListCondition"/>
|
||||
group by ecm.SUM_YM , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -939,15 +942,15 @@
|
||||
AND #{endMon} = DATE_FORMAT( NOW(), '%Y%m')
|
||||
AND DATE_FORMAT( REG_DT, '%Y-%m') = DATE_FORMAT( NOW(), '%Y-%m')
|
||||
GROUP BY
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m') , ewm.CH_STR
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m'), ewm.USER_SEQ , ewm.CH_STR
|
||||
<!-- 추가분 (끝) -->
|
||||
) t1 group by SUM_YM, USER_SEQ, sndChCd order by null
|
||||
) t2 group by SUM_YM, USER_SEQ order by null
|
||||
) t2 on t2.SUM_YM = t1.SUM_YM and t2.USER_SEQ = t1.USER_SEQ
|
||||
<!-- order by t1.SUM_YM, t1.USER_SEQ -->
|
||||
<include refid="custMstatListCondition"/>
|
||||
<!-- <include refid="custMstatListCondition"/> -->
|
||||
GROUP BY t1.BIZRNO, t1.SUM_YM
|
||||
ORDER BY t1.SUM_YM desc, t1.CUST_NM;
|
||||
ORDER BY t1.SUM_YM desc, t1.CUST_NM
|
||||
</select>
|
||||
|
||||
<select id="selectCustDstatListTotalCnt" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="int">
|
||||
@@ -1023,7 +1026,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD, ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1116,7 +1119,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC , ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1143,7 +1146,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1172,14 +1175,14 @@
|
||||
AND DATE_FORMAT( #{endDay}, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||
AND DATE_FORMAT( ewm.REG_DT, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||
GROUP BY
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m-%d') , ewm.CH_STR
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m-%d'), ewm.USER_SEQ , ewm.CH_STR
|
||||
<!-- 추가분 (끝) -->
|
||||
) t1 group by SUM_YMD, USER_SEQ, sndChCd order by null
|
||||
) t2 group by SUM_YMD, USER_SEQ order by null
|
||||
) t2 on t2.SUM_YMD = t1.SUM_YMD and t2.USER_SEQ = t1.USER_SEQ
|
||||
<include refid="custDstatListCondition"/>
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
GROUP BY t1.BIZRNO, t1.SUM_YMD
|
||||
order by SUM_YMD DESC, t1.USER_SEQ;
|
||||
order by SUM_YMD DESC, t1.USER_SEQ
|
||||
</select>
|
||||
|
||||
<select id="selectCustDstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmDayList">
|
||||
@@ -1210,7 +1213,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1302,7 +1305,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC , ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1328,7 +1331,7 @@
|
||||
from hubez_common.EZ_CUST_DSTAT ecm
|
||||
where 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
group by ecm.SUM_YMD , ecm.USER_SEQ
|
||||
ORDER BY ecm.SUM_YMD DESC, ecm.USER_SEQ
|
||||
) list
|
||||
@@ -1356,15 +1359,15 @@
|
||||
AND DATE_FORMAT( #{endDay}, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||
AND DATE_FORMAT( ewm.REG_DT, '%Y-%m-%d') = DATE_FORMAT( NOW(), '%Y-%m-%d')
|
||||
GROUP BY
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m-%d') , ewm.CH_STR
|
||||
DATE_FORMAT(ewm.REG_DT, '%Y-%m-%d'), ewm.USER_SEQ , ewm.CH_STR
|
||||
<!-- 추가분 (끝) -->
|
||||
) t1 group by SUM_YMD, USER_SEQ, sndChCd order by null
|
||||
) t2 group by SUM_YMD, USER_SEQ order by null
|
||||
) t2 on t2.SUM_YMD = t1.SUM_YMD and t2.USER_SEQ = t1.USER_SEQ
|
||||
<!-- order by t1.SUM_YMD, t1.USER_SEQ -->
|
||||
<include refid="custDstatListCondition"/>
|
||||
<!-- <include refid="custDstatListCondition"/> -->
|
||||
GROUP BY t1.BIZRNO, t1.SUM_YMD
|
||||
order by SUM_YMD DESC, t1.USER_SEQ;
|
||||
order by SUM_YMD DESC, t1.USER_SEQ
|
||||
</select>
|
||||
|
||||
<sql id="custMstatListCondition">
|
||||
|
||||
Reference in New Issue
Block a user