https://bbs.fanruan.com/wenda/question/66358.html
______
只要有个日期维表,随便玩= =#
———
select tt.t,CONCAT(tt.t,":",min(date),"~",max(DATe)) as XX from
(
SELECT
concat("第",TRUNCATE((row_number()over( partition by date_format(date,"%Y") order by date asc )-1)/7,0)+1,"周") as t,
DATe
FROM
DIC_DATE
WHERE
DATE >= "2021-01-01" AND DATE <= '2021-12-31'
) tt
group by tt.t