Ecclesiastes 2:15 (ESV)

15 Then I said in my heart, “What happens to the fool will happen to me also. Why then have I been so very wise?” And I said in my heart that this also is vanity.

If you look a little further, it seems as if the advantage of wisdom vanishes again. Whether you are wise or foolish, you will all die at some point. This fate befalls every person. People who have died are forgotten – including the people who have lived wisely. The same fate befalls both the wise and the foolish.