Viewing 2 posts - 1 through 2 (of 2 total)
I had the same thought as you but I think you would want to use row_number not rank. Here is a good example of the difference between rank, and...
March 1, 2015 at 8:04 am
#1780960
Thinking of the aggregate query.. curious if efficiencies could be gained using a WITH Statement or temp table and joining.
With Statement:
With S as (select ProductID,SalesOrderID,SUM(OrderQty) AS OrderQty FROM Sales.SalesOrderDetail GROUP...
February 26, 2015 at 8:21 am
#1780281