Ecc 9:5 "the dead know nothing; they have no further reward"
Rev 6:9,10 When he opened the fifth seal, I saw under the altar the souls of those who had been slain because of the word of God and the testimony they had maintained. They called out in a loud voice, “How long, Sovereign Lord, holy and true, until you judge the inhabitants of the earth and avenge our blood?”
Tone and style
There is a very clear difference between the style of these two books. One is written by a somewhat cynical older man (still under the inspiration of the Holy Spirit) who is looking at the vanity of everything physical; the other is written by an older saint in exile who is given a glimpse into heaven and a prophecy of the future.
Ecclesiastes is written from a perspective on the temporal world. Therefore, when Solomon wrote that the dead know nothing, his intent is clearly to highlight the disjoint between the dead and the living. He is focusing not on eternal links, but on temporal. He is essentially saying, "Once you've died, there's nothing left for you here.
Revelation is written from the perspective of a man who is in heaven being shown the things "that shall be hereafter." His focus, thus, is not on the earthly memory and rewards of the dead, but on their eternal souls.
Just in view of the tone and style, Solomon could accurately write "There is no reward for the dead" and John could just as accurately write that the souls were under the altar crying out to the Lord. A bit like you could tell one of your children that Dad's not coming home (he's gone for a few days instead of just till this evening) and another child that it won't be long till Dad's home (he's only gone for a few days) dependent on context.
There is also a context to the passage in Ecclesiastes:
All things come alike to all:
One event happens to the righteous and the wicked;
To the good,[a] the clean, and the unclean;
To him who sacrifices and him who does not sacrifice.
As is the good, so is the sinner;
He who takes an oath as he who fears an oath.
3 This is an evil in all that is done under the sun: that one thing happens to all. Truly the hearts of the sons of men are full of evil; madness is in their hearts while they live, and after that they go to the dead. 4 But for him who is joined to all the living there is hope, for a living dog is better than a dead lion.
5 For the living know that they will die;
But the dead know nothing,
And they have no more reward,
For the memory of them is forgotten.
(Ecclesiastes 9:2-5, NKJV)
There is an important word at the start of verse 5: For. It links us back to the verses before, as a part of a flowing text. The context in this section of Ecclesiastes is how the same thing happens both to good and evil people on the earth. He complains that pious people are treated the same as evil people. In verse 4, he contrasts that concept with the idea that at least the living person has the option of being treated in one way or another; whereas a dead person is (as far as this earth under the sun is concerned) totally gone and useless.
It is in that context that Solomon writes that they are gone; they have no reward - in other words, there is absolutely no hope of reversing the trend of the good and evil being treated the same once they are dead.
Ecclesiaste 9:5 deals with flesh, while Revelation 6 concerns spirits.
28 Do not be afraid of those who kill the body but cannot kill the soul. Instead, fear the One who can destroy both soul and body in hell.
The body dies, in which case it's forgotten, even then for 'a season, Daniel 12:2,' but the spirit 'lives on.'
As you are aware, the writer of Ecclestiaste is believed to be Solomon, having been the most knowledgeable and wise man on earth, he also was aware of a continuity of 'consciousness' in form of existence of a place named 'Sheol,' the place for the departed.
In all writings, 'Sheol' is indicated as place to where the 'dead' 'go,' rather than something that the 'dead' 'become,' therefore, he even qualifies further down in the very chapter the nature of existence of these departed spirits in these terms;
...for there is no activity or planning or knowledge or wisdom in Sheol where you are going.
Also his father David points out that the place of all the deceased is Sheol, to which 'people go', as opposed to a literal interment.
2 Samuel 12
22 He said, "While the child was still alive, I fasted and wept; for I said, 'Who knows, the LORD may be gracious to me, that the child may live.'
23"But now he has died; why should I fast? Can I bring him back again? I will go to him, but he will not return to me.
The altar throughout scriptures, and not only in Revelation 6, it signifies saints who are close to the very sacred things of God, while the court to the rest of the saints.
While being 'BELOW the altar' denotes the aspect of their being part of these saints in flesh(the altar), yet seperate from this altar(saints) because of their circumstances as spirits(BELOW).
Note that events of Revelation signify things that have been, are happening, and those yet to be.
It's the reason for these souls being 'below', Revelation 1:19, and why there's no contradiction between Ecclesiaste 9 and Revelation 6.