During the war of the Four Kings against the Five, Avram's nephew, Lot, was taken captive. Avram gathered an army and went to war with his nephew's captors. Ultimately, he vanquished the Four Kings and freed Lot, and, tangentially, saved Bera, the king of Sdom, who had fallen into a pit while fleeing the Four Kings. After the battle was over, Bera offered Avram the spoils of war, which were obviously Avram's by right of conquest. Avram declined his share, but noted that his refusal to be enriched by the spoils of war did not speak for the men who had joined his army:
Rashi says that the Ne'arim and the Anashim fought in the battle, but Aneir, Eshkol, and Mamrei did not actually bear arms for Avram. They only "guarded the possessions" of the combatants. Even so, Rashi explains, the passuk indicates parity among all their chalakim; Aneir and his friends were entitled to a share equal to that of the actual combatants. Rashi brings that this lesson was applied by David Hamelech in Shmuel I 30:23-4.
This also teaches us how we should appraise the relative status of those who enable others to learn by supporting and encouraging them, the yosheiv ahl hakeilim. As John Milton said, "They also serve who only stand and wait."
While I understand this as applied to Reb Akiva's Rachel, I find it difficult to understand in the context of an army. I would have thought that the persons who exposed themselves to immediate mortal danger and who exerted all possible human effort should be entitled to more. War in those days was not fought with rifles and computers- it was done hand to hand, with extremely heavy swords and spears, wielded by antagonists who were fighting for their lives. Yes, analysts and strategists have ten thousand times the effect of individual soldiers. But I think that the warriors deserve more recognition and reward than cooks and laundrymen and blacksmiths and the ישב על הכלים.
The Rambam paskens like this, more or less, in 4 Melachim 9:
In Mattos, Bamidbar 31, the Torah describes the war with Midian. Each Shevet sent out one thousand warriors, a total of 12,000, one fiftieth of the population. Obviously, besides these twelve thousand there were many more who supported them. No army in history could fight a war without support-- food, weapons, clothing, horses, people to guard the camp while the army is fighting, and more. I don't know what the ration is in modern armies, but as an uneducated guess, I would say that for every actual combatant, there would have to be at least two people behind the lines focused exclusively on vital support services. It is not correct to answer that the war against Midian was a matter of an afternoon's work, that it required no infrastructure, because the Tanchuma says there were three thousand from each shevet-- (31:4) "Elef lamateh elef lamateh" means one thousand warriors, one thousand support and supply (like Reb Yishmael in the Sifri as brought in the Baal Haturim), and one thousand for tefilla. According to Reb Akiva that elef means one thousand, the repetition elef/elef means that shevet Levi also sent one thousand. But even though Reb Akiva holds that they were not mentioned, he will have to agree that the thousand had support of a yosheiv ahl hakeilim group.
After the war was won, Moshe Rabbeinu told the people that the spoils were to be divided, with half going to the "tofsei hamilchama", those that "held the battle", and half to the rest of the people. Who are the tofsei milchama? We will have to say that this includes the support as well as the soldiers. According to the shittah that elef lamateh was only one thousand, then the phrase tofsei milchama is not the same as chalutzei tzava, because tofsei has to include many more who were yosheiv ahl hakeilim. Or, possibly, the phrase elef lamateh of chalutzei tzava included the yosheiv ahl hakeilim group and there were only a couple hundred armed warriors from each shevet. According to Reb Yishmael, Chalutzei Tzava itself includes all the support group, a total of three thousand per shevet.