오라클 -> MySQL 쿼리 변환하기
오라클 쿼리 : WITH DIV_SCOPE AS ( SELECT #{agoYr} || '1201' AS FRST_DT, TO_CHAR(LAST_DAY(TO_DATE(#{basYr} || '02', 'YYYYMM)), 'YYYYMMDD') AS LAST_DT, 1 AS DIV_NO FROM DUAL UNION SELECT #{basYr} || '0301' AS FRST_DT, TO_CHAR(LAST_DAY(TO_DATE(#{basYr} || '05', 'YYYYMM)), 'YYYYMMDD') AS LAST_DT, 2 AS DIV_NO FROM DUAL UNION SELECT #{basYr} || '0601' AS FRST_DT, TO_CHAR(LAST_DAY(TO_DATE(#{basYr} || '08', ..
2023.12.02