/**ORACLE 数据库**/
WITH TB AS (
SELECT
ROWNUM R,
TO_CHAR( TO_DATE( '2020-06-08', 'YYYY-MM-DD' ) + ROWNUM - 1, 'MM.DD' ) DAY_ID
FROM
DUAL CONNECT BY ROWNUM <= TO_DATE( '2020-07-09', 'YYYY-MM-DD' ) - TO_DATE( '2020-06-08', 'YYYY-MM-DD' ) + 1
),TB1 AS (
SELECT
ROWNUM R,
DAY_ID
FROM TB
WHERE DAY_ID IN (SELECT MIN(DAY_ID) FROM TB UNION ALL SELECT MAX(DAY_ID) FROM TB ) OR MOD(R,7) IN (0,1)
ORDER BY DAY_ID
)
SELECT
a.DAY_ID||'-'||b.DAY_ID 列
FROM TB1 a ,TB1 b
where mod(a.r,2)=1 and mod(b.r,2)=0 and a.r+1=b.r
2020-06-08和2020-07-09 分别替换成开始时间和结束时间参数就行了