Missing post IDs

0

Please login or register to vote for this query.

(click on this box to dismiss)

Electrical Engineering

Q&A for electronics and electrical engineering professionals, students, and enthusiasts

SELECT TOP 10 p.Id, n.NextId - p.Id
  
  FROM PostsWithDeleted AS p
  CROSS APPLY (
    SELECT MIN(Id) AS NextId FROM PostsWithDeleted WHERE Id > p.Id
  ) n
  WHERE n.NextId - p.Id != 1
  ORDER BY p.Id

-- WHERE Id BETWEEN 183225 AND 183229

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results