Within each customer, rank their orders by amount_usd descending (biggest first). All order statuses count. Orders with the same amount share a rank, and the next amount's rank counts every order above it (1, 2, 2, 4).
Sort by customer_id, then rnk, then order_id ascending.