As image above I need to sum the total with conditions
-Student has more then subjects
-every subject has 2 or 3 quizzes and final and re- test ( re-test :if the student get less then 60 from The final
the total final if the Subject has 2 quizzes = 15% from Q1 + 15% from Q1 +70% from final or from re-test
the total final if the Subject has 3 quizzes = 10% from Q1 + 10% from Q1 + 10% from Q3 +70% from final or from re-test
Notice: only one subject has 3 quizzes