标签: sql-server tsql reporting-services ssrs-2008-r2
查询看起来像这样:
SELECT Year, Month, ..., Count, ISNULL(PreviousCount, 0) FROM @Data AS DataTable LEFT JOIN @Data AS PreviousData ON PreviousData.Year = DataTable.Year - 1 AND ...
INNER JOIN