@"with userUsers as
(
SELECT ROW_NUMBER() OVER(ORDER BY EMAIL ASC) AS 'RowNumber', a.*, b.certs
FROM [dbo].[User] a left join [dbo].[Completed] b on a.UserId = b.UserId
where a.productId = @productId and a.osname=@oname
) select * from userUsers where
RowNumber>" + ((page - 1) * pageSize) + " and RowNumber<=" + (page * pageSize)