So I hated life, because the work that is worked under the sun was grievous to me; for all is vanity and a chasing after wind. I hated all my labor in which I labored under the sun, because I must leave it to the man who comes after me. Who knows whether he will be a wise man or a fool? Yet he will have rule over all of my labor in which I have labored, and in which I have shown myself wise under the sun. This also is vanity.
Traditional attribution
The text names “the Preacher, son of David, king in Jerusalem.” Solomon is the traditional identification.