You are actually sorting by the maximum amount per ID, so you need access to that column in your report query:
SELECT a.id,
a.amount,
(SELECT Max(amount)
FROM test b
WHERE b.id = a.id) AS maxamount
FROM test a
ORDER BY maxamount DESC,
a.amount DESC;
ID AMOUNT MAXAMOUNT
5 90 90
3 88 88
3 5 88
9 80 80
Once you have MAXAMOUNT
in your query you can use it as the report sort criteria.