instruction: Earliest and Latest Bumps for Questions Bumped N Times by Community User.
response: 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) AS B ON P.Id = B.PostId) AS S GROUP BY S.BumpCount ORDER BY S.BumpCount