In Revelation 20, how were the dead judged?


According to their works

I saw the dead, small and great, stand before God; and the books were opened: and another book was opened, which is the book of life: and the dead were judged out of those things which were written in the books, according to their works.

And the sea gave up the dead which were in it; and death and hell delivered up the dead which were in them: and they were judged every man according to their works. Revelation 20:12-13