Earliest and Latest Bumps for Questions Bumped N Times by Community User


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT S.BumpCount, MIN(S.FirstBump) AS EarliestBump, MAX(S.LastBump) AS LatestBump
  FROM (SELECT P.ID, B.BumpCount, B.FirstBump, B.LastBump, P.Title
          FROM Posts AS P
          JOIN (SELECT H.PostID, COUNT(*) AS BumpCount,
                       MIN(H.CreationDate) AS FirstBump,
                       MAX(H.CreationDate) AS LastBump
                  FROM PostHistory AS H
                 WHERE PostHistoryTypeID  = 50
                 GROUP BY PostID
                HAVING COUNT(*) > 2
               ) AS B
            ON P.ID = B.PostID
       ) AS S
 GROUP BY S.BumpCount
 ORDER BY S.BumpCount;

Enter Parameters

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