The Fatimids were led by vizier al-Afdal Shahanshah, who commanded perhaps as many as 20,000 troops (other estimates include the exaggerated 200,000 of the Gesta Francorum). His army consisted of Seljuk Turks, Arabs, Persians, Armenians, Kurds, and Ethiopians. He was intending to besiege the crusaders in Jerusalem, although he had brought no siege machinery with him; he did however have a fleet, also assembling in the port of Ascalon. The precise number of crusaders is unknown, but the number given by Raymond of Aguilers is 1,200 knights and 9,000 infantry. The highest estimate is 20,000 men but this is surely impossible at this stage of the crusade. Al-Afdal camped in the plain of al-Majdal in a valley outside Ascalon, preparing to continue on to Jerusalem and besiege the crusaders there, apparently unaware that the crusaders had already left to meet him. On August 11 the crusaders found oxen, sheep, camels, and goats, gathered there to feed the Fatimid camp, grazing outside the city. According to captives taken by Tancred in a skirmish near Ramla, the animals were there to encourage the crusaders to disperse and pillage the land, making it easier for the Fatimids to attack. However, al-Afdal did not yet know the crusaders were in the area and was apparently not expecting them. In any case, these animals marched with them the next morning exaggerating the appearance of their army.On the morning of the 12th, crusader scouts reported the location of the Fatimid camp and the army marched towards it. During the march the crusaders had been organized into nine divisions: Godfrey led the left wing, Raymond the right, and Tancred, Eustace, Robert of Normandy and Gaston IV of Béarn made up the centre; they were further divided into two smaller divisions, and a division of foot-soldiers marched ahead of each. This arrangement was also used as the line of battle outside Ascalon, with the center of the army between the Jerusalem and Jaffa Gates, the right aligned with the Mediterranean coast, and the left facing the Jaffa Gate.According to most accounts (both Crusader and Muslim), the Fatimids were caught unprepared and the battle was short, but Albert of Aix states that the battle went on for some time with a fairly well prepared Egyptian army.  The two main lines of battle fought each other with arrows until they were close enough to fight hand-to-hand with spears and other hand weapons. The Ethiopians attacked the centre of the crusader line, and the Fatimid vanguard was able to outflank the crusaders and surround their rearguard, until Godfrey arrived to rescue them. Despite his numerical superiority, al-Afdal's army was hardly as strong or dangerous as the Seljuk armies that the crusaders had encountered previously. The battle seems to have been over before the Fatimid heavy cavalry was prepared to join it. Al-Afdal and his panicked troops fled back to the safety of the heavily fortified city; Raymond chased some of them into the sea, others climbed trees and were killed with arrows, while others were crushed in the retreat back into the gates of Ascalon. Al-Afdal left behind his camp and its treasures, which were captured by Robert and Tancred. Crusader losses are unknown, but the Egyptians lost 10,000 infantry and 2,700 residents of Ascalon, including militia, killed.

Question: Where did Al-Afdal camp on his way to Jerusalem?
Answer: the plain of al-Majdal in a valley outside Ascalon

Question: Who was the greater of the two armies?
Answer: Seljuk