Revelation 20:11-15 (NKJV)
11 Then I saw a great white throne and Him who sat on it, from whose face the earth and the heaven fled away. And there was found no place for them. 12 And I saw the dead, small and great, standing before God, c and books were opened. And another book was opened, which is the Book of Life. And the dead were judged according to their works, by the things which were written in the books. 13 The sea gave up the dead who were in it, and Death and Hades delivered up the dead who were in them. And they were judged, each one according to his works. 14 Then Death and Hades were cast into the lake of fire. This is the second death. d 15 And anyone not found written in the Book of Life was cast into the lake of fire.
In revelation 20 it would seem everyone not found in the book of life is thrown into the lake of fire but then in revelation 22
Revelation 22:11-16 (NKJV)
14 Blessed are those who do His commandments, g that they may have the right to the tree of life, and may enter through the gates into the city. 15 But h outside are dogs and sorcerers and sexually immoral and murderers and idolaters, and whoever loves and practices a lie. 16 “I, Jesus, have sent My angel to testify to you these things in the churches. I am the Root and the Offspring of David, the Bright and Morning Star.”
In revelation 22 it would seem there are some who are not saved, where do they come from since they were destroyed during the white throne judgment