• Another approach using CTEs

    create table #Table1

    (

    Years int,

    [Value] int

    )

    insert #Table1(Years, [Value])

    Values

    (2000, 2)

    ,(2001, 4)

    ,(2002, 5)

    ,(2003, 3)

    ,(2004, 2)

    GO

    with SumAll(FullTotal) AS

    (SELECT SUM([value]) FROM #Table1)

    ,SumPartial(PartialTotal) AS

    (SELECT SUM([Value]) FROM #Table1 WHERE Years <= 2002)

    SELECT a.FullTotal, b.PartialTotal

    FROM SumALL a, SumPartial b

    There are no facts, only interpretations.
    Friedrich Nietzsche