Whether at sea or in freshwater, on mackerel or perch, many anglers have memories of exceptional fishing on schools of fish, and all know that these species, among many others, like to live in groups. If animals, including fish, often adopt this gregarious behavior, it's because it's in their interest to do so. Let's try to understand this phenomenon and how it evolves over time.

Schools of forage fish
Many species of small fish live in groups and their role in the food chain is much more that of prey than predator. I'm thinking in particular of those famous schools of baitfish that predators often seek out.
For them, living in a group is a matter of survival, because not only do they help each other in the search for food, but the group effect is also their best means of protection against predators. The more pairs of eyes they have, the easier it is for a shoal of forage fish to detect danger, sound the alarm and react quickly and effectively. What's more, this group's movements prevent predators from focusing on a specific prey, and in a way ensure the survival of the individual fish as such.
Moreover, for pelagic species, mainly at sea, this gregarious behavior also enables them to move economically and limit energy expenditure. Like a peloton in the Tour de France, the movement of the group creates a current that encourages movement.

Schools of predators
Fish live in groups because they are interested in feeding.
The group not only makes it easier to find food, but also to develop common hunting strategies.
What then determines the size of a predator group is the quantity of food available in the environment in relation to the individuals that make it up. Indeed, as long as the ratio of interest (available food)/group size is positive, fish will remain in the group, but when this ratio is reversed, the structure of the group changes. This implies that individuals in a group are generally of the same size, as they have the same needs, and that as they grow, the number of individuals in the group decreases.

The importance of the environment
The size of the environment, but above all the quantity of food it produces and the fish population it supports, are decisive factors in the structure of predatory fish shoals. In two different environments, for example, schools of perch can be quite different in size and number.

Individuals of the same size
Schools of fish are made up of fish of the same size, because the needs of each individual are identical and so is their interest in the group. Larger individuals have greater food requirements, and the perceived Interest/Contribution (to the group) ratio is therefore different from that of a smaller individual.
Furthermore, within the same species, an individual can be both predator and prey, and cannibalism is a very common behavior among fish. So, while schools of fish are made up of individuals of the same size, it is not impossible for a single species to find two distinct schools nearby, one of small fish and the other of larger ones.

Smaller groups over time
As the fish grow, the need for food becomes greater. If this doesn't change, the group becomes a problem, as competition for food is created. As a result, the group splits up, as each predator is no longer sufficiently interested. This is the main reason why large fish live in very small shoals or are almost solitary.
On the other hand, as we mentioned earlier, in an exceptional environment with a very large quantity of food, it's possible to find very large shoals of large individuals, as they simply find what they need, and gregariousness becomes worthwhile once again.