Viewing post 1 (of 1 total)
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)...
December 5, 2013 at 7:46 am
#1671106