내용을 계속 바꾸시면 댓글 주시는 분들이 힘들답니다 ~ :)
WITH T1 AS ( SELECT '2014-01-01' AS sd, '2014-05-05' AS ed FROM DUAL ), T2 AS ( SELECT TO_DATE(sd) + LEVEL - 1 AS td FROM T1 CONNECT BY TO_DATE(sd) + LEVEL - 1 <= TO_DATE(ed) ) SELECT td AS 날짜, TO_CHAR(td, 'YYYY-MM')||' '||wk||'주차' AS 주차 FROM ( SELECT td, RANK() OVER(PARTITION BY TO_CHAR(td, 'YYYY-MM') ORDER BY td) AS wk, ROW_NUMBER() OVER(ORDER BY ROWNUM DESC) AS lt FROM T2 WHERE 1 = TO_CHAR(td, 'd') ) WHERE lt <= 4 ORDER BY 날짜