Added limit to subquery for getUpcomingExams