StudentMarkingPeriodGrade SQL calculation correction