Hence, finally, Solomon is reported to have had several wives at once, to whom the Lord had said: "There has not been a wise man like you before you, and after you there shall not be." Because, therefore, the Lord had given him a multitude of prudence, "like the sand of the sea," that he might judge his people "in wisdom," therefore he was able to exercise several virtues at once.
Source: HOMILIES ON GENESIS 11.2