Ecclesiastes 2:21-23 NIV

21 For a man may do his work with wisdom, knowledge and skill, and then he must leave all he owns to someone who has not worked for it. This too is meaningless and a great misfortune.
22 What does a man get for all the toil and anxious striving with which he labors under the sun?1

References for Ecclesiastes 2:22

23 All his days his work is pain and grief;2 even at night his mind does not rest.3 This too is meaningless.

References for Ecclesiastes 2:23