sqlserver 周报 问题求解决,

想要用sql server 语句解决,周报是每周三上午8点到下周三的上午8点,就是将原日期空间的周改成周三8点到下周三8点,求解决

这次不分月了?

with t as (
select '2022-03-24 08:55:00' d union all 
select '2022-03-24 07:55:00' union all 
select '2022-03-23 08:55:00' union all 
select '2022-03-23 07:55:00' union all 
select '2022-03-22 08:55:00' union all 
select '2022-03-22 07:55:00' union all 
select '2022-03-21 08:55:00' union all 
select '2022-03-21 07:55:00' union all 
select '2022-03-17 08:55:00' union all 
select '2022-03-17 07:55:00' union all 
select '2022-03-16 08:55:00' union all 
select '2022-03-16 07:55:00' union all 
select '2022-03-15 08:55:00' union all 
select '2022-03-15 07:55:00' )
 
select d,datename(weekday,d), cast( datepart(week,DATEADD(HOUR,88,d)) as VARCHAR) from t

img