Updated next get next QuizID query to use max

Updated next get next QuizID query to use max