Find answers to HNQ by a specific user that were posted before the question became HNQ


Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

declare @EndDate datetime = (select case
  -- If we request 'today', actually use the date
  -- of the most recent transfer to this database,
  -- which may be as much as a week in the past.
  when lower(##EndDate:string?today##) = 'today' then max(CreationDate)
  -- Otherwise, specify the most recent date to include.
  else ##EndDate##
  from Posts

declare @StartDate datetime = dateadd(day, -1*##DaysBack?30##, @EndDate);

SELECT answers.Id [Post Link], answers.CreationDate as 'Answer Posted', ph.CreationDate as 'Became HNQ'
FROM PostHistory ph
INNER JOIN Posts answers ON answers.ParentId=ph.PostId
WHERE answers.OwnerUserId= ##userId##
  AND answers.CreationDate between @StartDate and @EndDate
  AND ph.PostHistoryTypeId=52
  AND answers.CreationDate < ph.CreationDate

Enter Parameters

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