"The final conclusion on the matter". At the end of a very impressive life, Solomon looks back and sees that the only real lasting thing in this world is Yahweh. The purpose of his life was to honor Yahweh, something he should have done far more throughout his life. Therefore, he felt that his life was wasted.