Questions protected/unprotected by specified user by event and age.


Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT PostId AS [Post Link], t.Name, ph.CreationDate as 'EventDate', 
DATEDIFF(day, Posts.CreationDate, CURRENT_TIMESTAMP) as 'Post Age (days)'
  FROM PostHistory AS ph
  INNER JOIN PostHistoryTypes AS t ON ph.PostHistoryTypeId = t.Id
  INNER JOIN Posts ON ph.PostId =
  WHERE PostHistoryTypeId IN (19, 20) -- Question Protected, Question Unprotected
    AND UserId = ##UserId:int##
  ORDER BY EventDate

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results