1.獲取每日實際銷售額
select CONVERT(varchar(10),t1.Created,120),sum(t1.Payment) from Trade t1
where t1.OrderSource=1 and t1.Created>'2017-01-01'
and t1.IsVP=0
group by CONVERT(varchar(10),t1.Created,120)
order by CONVERT(varchar(10),t1.Created,120)
2.將結果複製到表格進行下一步處理
3.計算周權重銷售指數
去掉特殊日期的銷售額,然後取各星期的平均銷售額,再以最小銷售額的星期為最小被除數,求得各星期幾的日權重.