13 I saw that wisdom is better than folly, just as light is better than darkness.
14 The wise have eyes in their heads, while the fool walks in the darkness; but I came to realize that the same fate overtakes them both.
15 Then I said to myself, “The fate of the fool will overtake me also. What then do I gain by being wise?” I said to myself, “This too is meaningless.”
16 For the wise, like the fool, will not be long remembered; the days have already come when both have been forgotten. Like the fool, the wise too must die!

Toil Is Meaningless

17 So I hated life, because the work that is done under the sun was grievous to me. All of it is meaningless, a chasing after the wind.
18 I hated all the things I had toiled for under the sun, because I must leave them to the one who comes after me.
19 And who knows whether that person will be wise or foolish? Yet they will have control over all the fruit of my toil into which I have poured my effort and skill under the sun. This too is meaningless.
20 So my heart began to despair over all my toilsome labor under the sun.
21 For a person may labor with wisdom, knowledge and skill, and then they must leave all they own to another who has not toiled for it. This too is meaningless and a great misfortune.
22 What do people get for all the toil and anxious striving with which they labor under the sun?
23 All their days their work is grief and pain; even at night their minds do not rest. This too is meaningless.