Q&A for those involved in the field of teaching Computer Science
SELECT p.Id+1, p.CreationDate, n.NextId - p.Id - 1 AS 'Missing post ID', CONCAT('site://posts/', p.Id + 1, '/revisions') AS 'First missing post' FROM PostsWithDeleted AS p CROSS APPLY ( SELECT MIN(Id) AS NextId FROM Posts WHERE Id > p.Id ) n WHERE n.NextId - p.Id != 1 and p.CreationDate >= ##date1:string## and p.CreationDate <= ##date2:string## ORDER BY p.Id