--按周统计SELECT TOP 10DATENAME(year,AddDate) 年,DATENAME(week,AddDate) 周,COUNT(1) 单量,SUM(total) 总金额,AVG(total) 客单价FROM orderinfo t(NOLOCK)WHERE AddDate BETWEEN '2013-1-1' AND '2014-1-1'GROUP BY DATENAME(year,AddDate),DATENAME(week,AddDate)ORDER BY CONVER