また、年度ごとに累計値をリセットしたい場合などは条件式を変えることによって計算することができます。 update 金額集計Test set 年度単位金額累計 = 累計 from ( select A.年月, sum(B.金額) as 累計 from 金額集計Test A left outer join 金額集計Test B on B.年月 <= A.年月 and B.年月 >= case when cast(right(A.年月, 2) as int) >= 4 then left(A.年月, 4) + N'04' else cast(cast(left(A.年月, 4) as int) - 1 as nvarchar(4)) + N'04' end group by A.年月 ) as C where 金額集計Test.年月 = C.年月 上記の SQL を実行すると「年度単位金額累計」