20:12And I saw the dead, the great and the small, standing before the throne, and books were opened; and another book was opened, which is the book of life; and the dead were judged from the things which were written in the books, according to their deeds.

And I saw THE DEAD, the great and the small,

These are THE DEAD who missed the first resurrection (Revelation 20:5). Their major sin was UNBELIEF.

All classes of persons are involved. There is no privilege of rank when God is involved. If anyone held someone in more esteem, the 'great' holding themselves as important and the 'small' holding someone of the 'great' group as important, both are guilty of idolatry, for only GOD HIMSELF should have all our esteem. Note that both UNBELIEF and IDOLATRY are in the list of candidates for the Lake of Fire (Revelation 21:8).

standing before the THRONE,

It is no coincidence that the earth and heaven fled away from the throne and Him who sat on it in the previous verse. Imagine what THE DEAD are going through having to stand there before the THRONE! Stand there, they must, while their DEEDS are flashed before them.

and BOOKS were opened; and another BOOK was opened, which is the BOOK of LIFE;

God doesn't need BOOKS to remember what either THE ALIVE (Hebrews 4:12-13) or THE DEAD (this verse and the next verse) have done. This expression is for human understanding to show us that EVERYTHING that we do and think is remembered in the BOOKS.

Many scholars distinguish that 'the BOOKS' are a recording of the DEEDS and that the 'BOOK of LIFE' is a list of names (Revelation 3:5 and Revelation 20:15). Now we all know that many people have the same given name, so to make sure that there are no mix ups, the names recorded in the 'BOOK of LIFE' are unique. Perhaps they are the genetic DNA code birthed or breathed into us (Genesis 2:4-7-9). Breath often is equated to the spiritual side of mankind. Also note that there is an interaction with blood, too, to make life (Leviticus 17:10-14-16).

and THE DEAD were JUDGED from the things which were written in THE BOOKS, ACCORDING TO THEIR DEEDS.

Any single DEED written in THE BOOKS would be enough to condemn each of THE DEAD. However, in the interest of completeness, and, I suspect to ensure that ALL EVIL is revenged (Revelation 6:10 for one example), ALL DEEDS will be trotted out. Furthermore, those eyes of fire (Revelation 1:14) and the voice of Jesus (Revelation 1:15) will try each DEED (John 5:25-29) to see what it really is made of. And don't think it is only the overt DEEDS, the secret ones too will be judged (Romans 2:1-16-16). We certainly pray that the readers of this discussion understand how important it is to NOT be among THE DEAD!