SELECT c.PostId AS [Post Link], AVG(CAST(ph.Comment as in...

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace

Q&A for members of the workforce navigating the professional setting

SELECT 
  c.PostId AS [Post Link],
  AVG(CAST(ph.Comment as int)) AS 'Close Reason'
FROM Comments c
  JOIN Posts p on c.PostId = p.Id
  JOIN PostHistory ph on c.PostId = ph.PostId
WHERE c.Text LIKE '% rant %' and p.PostTypeId = 1 and ph.PostHistoryTypeId = 10
GROUP BY c.PostId

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results