Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: SQLServerCentral apologizes and you can win a book

    Would love a copy of his book.

    The following gives me the annual sales for customers in a given year.

    Thanks!

    SELECT c.CustomerId [Customer ID]

    , DATEPART(yyyy, t.TranDate) [Bill Year]

    , SUM(t.SalesAmount) OVER(PARTITION BY c.CustomerId)...

Viewing post 1 (of 1 total)