• Try changing

    select csa.* ,ROW_NUMBER() over (Partition BY csa.customer_number order by

    csa.erp_id,csa.ANNUAL_CONTRACT_PRICE desc) as Rank

    to

    select csa.* ,ROW_NUMBER() over (Partition BY csa.customer_number order by

    csa.ANNUAL_CONTRACT_PRICE, csa.erp_id desc) as Rank

    So that if you have a draw on the ANNUAL_CONTRACT_PRICE, then the erp_id will ensure consistency in the ordering.