select OrderID ,Amount ,rank() over (order by Amount desc) from Orders group by OrderID, Amount