Fredo is back again with an interesting activity for his class. Today, all students of his class are playing a game. Every student in the class has a unique roll number. Each student belongs to some house (Red/ Yellow/ Green/ Blue). The students are uniquely ranked in the game.
The student with rank $$i$$ gets $$(n+1-i)*100$$ points where $$n$$ is the total number of students in the class. Fredo wants to know the total points for each house and the best performing student's name for that house. Help him achieve the task.
Total points for any house is the sum of all students' points belonging to that house.Best performing student for any house is the student which earns the house most points.
Note: Output should contain the houses in ascending order of their names.
Table : Students
Sample Students Table:
Sample Positions Table:
Sample Houses Table: