Q&A for electronics and electrical engineering professionals, students, and enthusiasts
SELECT p.Id, n.NextId - p.Id, CONCAT('site://posts/', p.Id + 1, '/revisions') FROM PostsWithDeleted AS p CROSS APPLY ( SELECT MIN(Id) AS NextId FROM PostsWithDeleted WHERE Id > p.Id ) n WHERE n.NextId - p.Id != 1 AND p.Id BETWEEN 183225 AND 183229 ORDER BY p.Id