with x1 as (select level as seq,
( date '2020-08-01' + level - 1) as cur_date,
to_char(date '2020-08-01'+level - 1,'D') as cur_date_seq,
case when
to_char(date '2020-08-01' + level -1 ,'D') = '1' THEN '星期日'
when to_char(date '2020-08-01' + level -1 ,'D') = '7' THEN '星期六' end 周几
from dual
connect by rownum <= date '2020-09-01' - date '2020-08-01')
select cur_date,周几 from x1 where x1.周几 in ('星期六','星期日')