The Preacher resolves to test joy and pleasure, but concludes that this too is vanity. He explores wine while keeping wisdom at the helm, and takes on great projects: he builds houses, plants vineyards, gardens and parks with every kind of fruit tree, and makes pools of water to irrigate a forest of trees. He acquires male and female servants, herds and flocks, silver and gold, singers, and the delights of the sons of men.
He became greater than all who were before him in Jerusalem, and he kept from his eyes nothing they desired. His heart found joy in all his toil, and that was his reward. But when he considered all that his hands had done and the labor it had cost, he saw that it was all vanity and a chasing after wind, with no profit under the sun.
Then he compares wisdom with folly. Wisdom excels folly as light excels darkness, yet the same fate comes to both: death, and neither will be remembered forever. He hates his toil because he must leave it to whoever comes after him, who may be wise or foolish, and his heart despairs.
The chapter closes with a turn: there is nothing better for a person than to eat, drink and enjoy his work, and this comes from the hand of God. God gives wisdom, knowledge and joy to the one who pleases him, while to the sinner he gives the task of gathering and storing up to hand over to one who pleases God.