Revelation 20:5-6

20:5 (The rest of the dead did not come to life until the thousand years were finished.) This is the first resurrection. 20:6 Blessed and holy is the one who takes part in the first resurrection. The second death has no power over them, but they will be priests of God and of Christ, and they will reign with him for a thousand years.

Revelation 20:12

20:12 And I saw the dead, the great and the small, standing before the throne. Then books were opened, and another book was opened – the book of life. So the dead were judged by what was written in the books, according to their deeds.