I hated the things I worked so hard for here under the sun, because I will have to leave them to someone who comes after me.
And who knows whether that one will be wise or foolish? Either way, that person will have control over the results of all my hard work and wisdom here under the sun. That too is pointless.
I then gave myself up to despair, as I thought about all my laborious hard work under the sun,
because sometimes those who have worked hard with wisdom, knowledge, and skill must leave the results of their hard work as a possession to those who haven't worked hard for it. This too is pointless—it's a terrible wrong.
I mean, What do people get for all their hard work and struggles under the sun?
All their days are pain, and their work is aggravation; even at night, their hearts don't find rest. This too is pointless.
There's nothing better for human beings than to eat, drink, and experience pleasure in their hard work. I also saw that this is from God's hand—
Who can eat and find enjoyment otherwise?—
because God gives wisdom, knowledge, and joy to those who please God. But to those who are offensive, God gives the task of hoarding and accumulating, but only so as to give it all to those who do please God. This too is pointless and a chasing after wind.
References for Ecclesiastes 2:26