select [ID], [Name], [Age] from YourTable
except
select Top 1 [ID], [Name], [Age] from YourTable order by ID DESC
union all
select Top 1 [ID], [Name], [Age] from YourTable order by ID DESC
This line
select [ID], [Name], [Age] from YourTable
except
select Top 1 [ID], [Name], [Age] from YourTable order by ID DESC
will filter the last row and again add it using this line
select Top 1 [ID], [Name], [Age] from YourTable order by ID DESC
. The reason to exclude it and then including comes into play for the last page. If it is not done in this way, It will add the last record twice on the last page.