I have a table:
quiz userid attempt grade 1 3 1 33 2 3 1 67 1 3 2 90 10 3 4 20 2 3
Selecting the last two rows = selecting the first two rows of a reversed set.
Simply order by attempt DESC (that makes it 4,3,2,1) and then grab the first two (4,3).
attempt
SELECT * FROM table WHERE <...> ORDER BY attempt DESC LIMIT 2