SELECT order_id, customer, amount, ROW_NUMBER() OVER ( PARTITION BY customer ORDER BY amount DESC ) AS position FROM orders WHERE position <= 2;