Ecclesiastes 2:21 in the World English Bible
For there is a man whose labor is with wisdom, with knowledge, and with skillfulness; yet he shall leave it for his portion to a man who has not labored for it. This also is vanity and a great evil.
Context
20 Therefore I went about to cause my heart to despair of all the labour which I took under the sun.
21 For there is a man whose labour is in wisdom, and in knowledge, and in equity; yet to a man that hath not laboured therein shall he leave it for his portion. This also is vanity and a great evil.
22 For what hath man of all his labour, and of the vexation of his heart, wherein he hath laboured under the sun?