|
@@ -49,9 +49,9 @@
|
|
|
, A.PYRQ_CNDT
|
|
|
, A.CTMN_CNDT
|
|
|
FROM CON_PJT_MST A
|
|
|
- LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = A.STD_YM
|
|
|
+ LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = B.STD_YM
|
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
|
- AND A.STD_YM <![CDATA[<]]>= #{stdYm}
|
|
|
+ AND A.STD_YM <![CDATA[<=]]> #{stdYm}
|
|
|
AND A.CC_CD LIKE #{ccCd}
|
|
|
GROUP BY A.CMPN_CD , A.STD_YM , A.CCGRP_CD, A.CC_CD, A.SALE_AMT, A.PYRQ_CNDT, A.CTMN_CNDT
|
|
|
)
|
|
@@ -70,10 +70,10 @@
|
|
|
, NVL(C.CTMN_AMT,0) CTMN_AMT
|
|
|
, TO_CHAR(TO_DATE(B.CTMN_EXP_DT,'YYYY-MM-DD'),'YYYY-MM-DD') CTMN_EXP_DT
|
|
|
FROM CON_PJT_MST A
|
|
|
- LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = A.STD_YM
|
|
|
- LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
+ LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = B.STD_YM
|
|
|
+ LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.STD_YM = #{stdYm} AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
|
- AND A.STD_YM <![CDATA[<]]>= #{stdYm}
|
|
|
+ AND A.STD_YM <![CDATA[<=]]> #{stdYm}
|
|
|
AND A.CC_CD LIKE #{ccCd}
|
|
|
) B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CCGRP_CD = A.CCGRP_CD AND B.CC_CD = A.CC_CD
|
|
|
LEFT JOIN
|
|
@@ -90,10 +90,10 @@
|
|
|
, NVL(B.PYRQ_AMT,0) PYRQ_AMT
|
|
|
, NVL(C.CTMN_AMT,0) CTMN_AMT
|
|
|
FROM CON_PJT_MST A
|
|
|
- LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = A.STD_YM
|
|
|
- LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
+ LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = B.STD_YM
|
|
|
+ LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.STD_YM = #{stdYm} AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
|
- AND A.STD_YM <![CDATA[<]]>= #{stdYm}
|
|
|
+ AND A.STD_YM <![CDATA[<=]]> #{stdYm}
|
|
|
AND A.CC_CD LIKE #{ccCd}
|
|
|
)
|
|
|
GROUP BY CMPN_CD, STD_YM, CCGRP_CD, CC_CD, PYRQ_DGR_CN, PYRQ_AMT, CTMN_EXP_DT
|
|
@@ -110,7 +110,7 @@
|
|
|
FROM CON_PJT_MST A
|
|
|
LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = A.STD_YM
|
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
|
- AND A.STD_YM <![CDATA[<]]>= #{stdYm}
|
|
|
+ AND A.STD_YM <![CDATA[<=]]> #{stdYm}
|
|
|
AND A.CC_CD LIKE #{ccCd}
|
|
|
) D ON D.CMPN_CD = A.CMPN_CD AND D.STD_YM = A.STD_YM AND D.CCGRP_CD = A.CCGRP_CD AND D.CC_CD = A.CC_CD
|
|
|
LEFT JOIN
|
|
@@ -127,10 +127,10 @@
|
|
|
, NVL(B.PYRQ_AMT,0) PYRQ_AMT
|
|
|
, NVL(C.CTMN_AMT,0) CTMN_AMT
|
|
|
FROM CON_PJT_MST A
|
|
|
- LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = A.STD_YM
|
|
|
- LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
+ LEFT JOIN CON_PJT_PYRQ B ON B.CMPN_CD = A.CMPN_CD AND B.STD_YM = A.STD_YM AND B.CC_CD = A.CC_CD AND SUBSTR(B.PYRQ_DT,0,6) = B.STD_YM
|
|
|
+ LEFT JOIN CON_PJT_CTMN C ON C.CMPN_CD = B.CMPN_CD AND C.STD_YM = #{stdYm} AND C.CC_CD = B.CC_CD AND C.DOCU_NO = B.DOCU_NO
|
|
|
WHERE A.CMPN_CD = #{cmpnCd}
|
|
|
- AND A.STD_YM <![CDATA[<]]>= #{stdYm}
|
|
|
+ AND A.STD_YM <![CDATA[<=]]> #{stdYm}
|
|
|
AND A.CC_CD LIKE #{ccCd}
|
|
|
)
|
|
|
GROUP BY CMPN_CD, STD_YM, CCGRP_CD, CC_CD, PYRQ_DGR_CN, PYRQ_AMT, CTMN_EXP_DT
|