I hated all my work at which I labored under the sun because I must leave it to the man who comes after me.
References for Ecclesiastes 2:18
And who knows whether he will be a wise man or a fool? Yet he will take over all my work that I labored at skillfully under the sun. This too is futile.
So I began to give myself over to despair concerning all my work I had labored at under the sun.
References for Ecclesiastes 2:20
For there is a man whose work was done with wisdom, knowledge, and skill, but he must give his portion to a man who has not worked for it. This too is futile and a great wrong.
For what does a man get with all his work and all his efforts that he labors with under the sun?
For all his days are filled with grief, and his occupation is sorrowful; even at night, his mind does not rest. This too is futile.
There is nothing better for man than to eat, drink, and to enjoyhis work. I have seen that even this is from God's hand.
References for Ecclesiastes 2:24
For who can eat and who can enjoy life apart from Him?
References for Ecclesiastes 2:25
For to the man who is pleasing in His sight, He gives wisdom, knowledge, and joy, but to the sinner He gives the task of gathering and accumulating in order to give to the one who is pleasing in God's sight. This too is futile and a pursuit of the wind.