The code you gave didnt work. No error this time around
Take a look at the Student DB. I hope this is more easier.
Additional, Can you help me on how to set up position on student terminal report. Like 1st, 2nd, 3rd, 4th ................. and so on based on student average.