Viewing post 1 (of 1 total)
-- Ranking of orders by OrderTotal per Account/Year
SELECT
A1.Account
,Year(SO1.OrderDate) OrderYear
,Rank() OVER(Partition by A1.Account,Year(SO1.OrderDate) Order By SO1.OrderTotal Desc) AS Rank_Num
,SO1.OrderTotal OrderTotal
FROM SalesOrder...
December 5, 2013 at 7:57 am
#1671115