with tab as (select to_char(everyDay,'yyyy-mm-dd') as dt,
to_char(everyday,'yyyy') as yy,
to_char(everyday,'mm') as mm,
TO_CHAR(everyday, 'WW') - TO_CHAR(TRUNC(everyday, 'MM'), 'WW') + 1 AS weekOfMon
from(select to_date('20180101','yyyymmdd') + level - 1 as everyDay from dual
connect by level <=
(last_day(to_date('20181201','yyyymmdd')) - to_date('20180101','yyyymmdd') +1))
)
select yy,mm,weekOfMon,min(dt),max(dt) from tab t
group by yy,mm,weekOfMon
order by yy,mm,weekOfMon
2018年每月中每周的开始日期与结束日期给你列出来了,剩下的知道怎么写了吧。