It is probably possible to come up with some SQL for this. The query https://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Detailed_data_about_an_attempt is part of what you need, but that is only a starting point.
Quiz
Highest grade based on question, not based on quiz attempt.
This discussion has been locked so you can no longer reply to it.