-- 计算同比 selectc.DepartNameas部门,convert(varchar(10), c.SalesDate,23)as对比年月, c.Salesas本月销售总量, d.Salesas去年同期销售总量,casewhend.Salesisnullord.Sales=0then'无穷大'elsecast(cast((isnull(c.Sales,0)-isnull(d.Sales,0))*100/isnull(d.Sales,0)asdecimal(10,2))asvarchar(...