Ecclesiastes 8:1-17 (ESV) Who is like the wise? And who knows the interpretation of a thing? A man's wisdom makes his face shine, and the hardness of his face is changed.  I say: Keep the king's command, because of God's oath to him.  Be not hasty to go from his presence. Do not take your stand in an evil cause, for he does whatever he pleases.  For the word of the king is supreme, and who may say to him, “What are you doing?”  Whoever keeps a command will know no evil thing, and the wise heart will know the proper time and the just way.  For there is a time and a way for everything, although man's trouble lies heavy on him.  For he does not know what is to be, for who can tell him how it will be?  No man has power to retain the spirit, or power over the day of death. There is no discharge from war, nor will wickedness deliver those who are given to it.  All this I observed while applying my heart to all that is done under the sun, when man had power over man to his hurt.  Then I saw the wicked buried. They used to go in and out of the holy place and were praised in the city where they had done such things. This also is vanity.  Because the sentence against an evil deed is not executed speedily, the heart of the children of man is fully set to do evil.  Though a sinner does evil a hundred times and prolongs his life, yet I know that it will be well with those who fear God, because they fear before him.  But it will not be well with the wicked, neither will he prolong his days like a shadow, because he does not fear before God.  There is a vanity that takes place on earth, that there are righteous people to whom it happens according to the deeds of the wicked, and there are wicked people to whom it happens according to the deeds of the righteous. I said that this also is vanity.  And I commend joy, for man has nothing better under the sun but to eat and drink and be joyful, for this will go with him in his toil through the days of his life that God has given him under the sun.  When I applied my heart to know wisdom, and to see the business that is done on earth, how neither day nor night do one's eyes see sleep,  then I saw all the work of God, that man cannot find out the work that is done under the sun. However much man may toil in seeking, he will not find it out. Even though a wise man claims to know, he cannot find it out.