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