Questions both closed and answered by the given user


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for Tridion developers and administrators

---If a question was closed multiple times, it will be shown more than once in the results of this query
;with closevoters_cte AS (
select postid as pid,,
     cv.userid as uid,
     ph.Id as phid
from posthistory ph
inner join closereasontypes crt on = comment
cross apply OPENJSON(JSON_QUERY(ph.text, '$.Voters'))
       with (userid int '$.Id') cv
where posthistorytypeid = 10

  CASE Comment
    WHEN 1 THEN 'Exact Duplicate'
    WHEN 2 THEN 'Off-topic'
    WHEN 3 THEN 'Subjective and argumentative'
    WHEN 4 THEN 'Not a real question'
    WHEN 7 THEN 'Too localized'
    WHEN 10 THEN 'General reference'
    WHEN 20 THEN 'Noise or pointless'
    WHEN 101 THEN 'Duplicate'
    WHEN 102 THEN 'Off-topic'
    WHEN 103 THEN 'Unclear what you''re asking'
    WHEN 104 THEN 'Too broad'
    WHEN 105 THEN 'Primarily opinion-based'
  AS [Close Reason],
  q.Id AS [Post Link], 
  'site://posts/' + CAST(q.Id AS varchar)+'/revisions' AS [Revision History],
  a.Id AS [Post Link],
  q.Score, a.Score, q.ViewCount, q.Tags
FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id
  INNER JOIN PostHistory ph ON ph.PostId=q.Id
  INNER JOIN closevoters_cte cv ON cv.phid=ph.Id
WHERE (q.ClosedDate IS NOT NULL) AND (a.OwnerUserId=##userId##) AND (ph.PostHistoryTypeId=10) AND (cv.uid=a.OwnerUserId)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results