Ecclesiastes.
Chapter 9.
So I took all this to heart and concluded that the righteous and the wise, as well as their deeds, are in God’s hands. Man does not know what lies ahead, whether love or hate. 
It is the same for all: There is a common fate for the righteous and the wicked, for the good and the bad, for the clean and the unclean, for the one who sacrifices and the one who does not. As it is for the good, so it is for the sinner; as it is for the one who makes a vow, so it is for the one who refuses to take a vow. 
This is an evil in everything that is done under the sun: There is one fate for everyone. Furthermore, the hearts of men are full of evil and madness while they are alive, and afterward they join the dead. 
There is hope, however, for anyone who is among the living; for even a live dog is better than a dead lion. 
For the living know that they will die, but the dead know nothing. They have no further reward, because the memory of them is forgotten. 
Their love, their hate, and their envy have already vanished, and they will never again have a share in all that is done under the sun. 
Go, eat your bread with joy, and drink your wine with a cheerful heart, for God has already approved your works: 
Let your garments always be white, and never spare the oil for your head. 
Enjoy life with your beloved wife all the days of the fleeting life that God has given you under the sun—all your fleeting days. For this is your portion in life and in your labor under the sun. 
Whatever you find to do with your hands, do it with all your might, for in Sheol, where you are going, there is no work or planning or knowledge or wisdom. 
I saw something else under the sun: The race is not to the swift, nor the battle to the strong; neither is the bread to the wise, nor the wealth to the intelligent, nor the favor to the skillful. For time and chance happen to all. 
For surely no man knows his time: Like fish caught in a cruel net or birds trapped in a snare, so men are ensnared in an evil time that suddenly falls upon them. 
I have also seen this wisdom under the sun, and it was great to me: 
There was a small city with few men. A mighty king came against it, surrounded it, and built large siege ramps against it. 
Now a poor wise man was found in the city, and he saved the city by his wisdom. Yet no one remembered that poor man. 
And I said, “Wisdom is better than strength, but the wisdom of the poor man is despised, and his words are not heeded.” 
The calm words of the wise are heeded over the shouts of a ruler among fools. 
Wisdom is better than weapons of war, but one sinner destroys much good. 
