周转换成标准的格式区间
select
ds
,WEEKDAY(ds)
,emp坐席互聊组数/emp坐席沟通组数 as 互聊率
,客户发送会话量/客户沟通数 as 客户日均发送会话量
-- concat(DATE_ADD(ds,-WEEKDAY(ds),'dd')
-- ,'~' ,DATE_ADD(ds,6-WEEKDAY(ds),'dd')) as weekly_range
,DATE_ADD(ds,INTERVAL -WEEKDAY(ds) day)
,DATE_ADD(ds,INTERVAL 6-WEEKDAY(ds) day)
,concat(DATE_ADD(ds,INTERVAL -WEEKDAY(ds) day) ,'~' ,DATE_ADD(ds,INTERVAL 6-WEEKDAY(ds) day)) as weekly_range
from ods_wx_da_newuser_first
where first_send_type = "客户首次发起"