标签: reporting-services ssrs-2008-r2 ssrs-grouping
我必须按周分组我的SQL查询。但该记录包含多年的数据。我使用了查询SELECT datepart(week, myDate) as week。但在第1周,它显示了每年的数据
SELECT datepart(week, myDate) as week
如何在同一年再次对周数进行分组
答案 0 :(得分:0)
SELECT datepart(week, myDate) as week, datepart(year, myDate) as year, ... from table group by concat(year, '-', week);