Post History by Review task

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

SELECT 
  h.PostId AS [PostId],
  -- h.Id AS [h Id],
  h.PostHistoryTypeId AS [h TypeId],

  h.CreationDate AS [h cDate],
  h.UserId AS [h UserId],
  h.Comment AS [h Comment],
  h.Text AS [h Text],
  rt.ReviewTaskTypeId AS [rt TypeId],
  rt.CreationDate AS [rt Created],
  rt.ReviewTaskStateId AS [rt StateId],
  CASE rt.ReviewTaskStateId
    WHEN 1 THEN 'Active'
    WHEN 2 THEN 'Completed'
    WHEN 3 THEN 'Invalidated'
  END AS [rt State]   
 -- rt.PostId AS [rt PostId]
FROM PostHistory h
RIGHT JOIN ReviewTasks rt ON rt.PostId = h.PostId

--RIGHT JOIN ReviewTaskResults rtr ON rtr.Id = rt.CompletedByReviewTaskId


WHERE rt.ReviewTaskTypeId IN (##types?4,12##)  
  AND (rt.CreationDate >= '##startDate?2005-01-01##') 
  AND (rt.CreationDate <= '##endDate?2030-12-31##')
  
order by h.CreationDate

Enter Parameters

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