Interestingly, there is no official Olympic medal table and the methodology of how it has been unofficially calculated has varied over recent years. For the 2016 Olympics it is based simply on the number of gold medals, but in future perhaps it should have some kind of weighted average, 3 for gold, 2 for silver and 1 for bronze? That being said the 2016 Olympic table shows some fascinating linkages between sport and geopolitical power.
In humanity’s ancient past, survival was the key focus; but we are social animals, and fights would have occurred in order to resolve differences between members of a tribe. However, struggles to the death would weaken a tribe by depleting its members. Thus, we can speculate, the notion of ritualised competition as a safe channel for aggression must have arisen. With the later advent of weapons, the need to train for their use in a non-lethal way would also have been necessary.