Return each order's id, total and price_rank: its DENSE_RANK by total, highest first, so equal totals share a rank and no ranks are skipped. Sort by price_rank, then id.
Schema
customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)