I think there might be a confusion in the question. The question wants the average ratio between
Total for all of the majors.
Imagine you are getting candies for Halloween for the kids, and here are some random possible scenarios:
So the equivalent question as the mission would be, what’s the average number of candies a child gets, in all of these scenarios?
Let’s not worry about splitting the candies in this case, and hope the kids will share equally… The equation to answer the question would be the average of the number of candies a child get in each scenario, which is:
((10/5)+(20/8)+(25/10)+(30/12))/4, in SQL language, it’s
AVG(CAST(number_of_candies AS FLOAT)/number_of_kids).
Your solution to sum each column and then divide by one another is kinda like seeing all scenarios as a whole and related, but they are actually individual cases.
Btw, I remember struggling through the whole SQL section of the path and the wordings were more often than not, confusing as ■■■■… It does get better though, just need to take breaks more often.
Hope this helps.