MDL-46576 core_grades: Simplify Sum of grades calculation to match other aggregation types