WITH Ordered AS ( SELECT ROW_NUMBER() OVER ..... LIMIT n,1 doesn't work in MS SQL Server.
stackoverflow.com