Tags with the largest percentage of HNQs

1

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

; with counts_cte AS (
SELECT 
  t.tagname AS tagname,
  COUNT(ph.Id) AS counthot
FROM PostHistory ph INNER JOIN Posts p ON ph.PostId=p.Id
  INNER JOIN PostTags pt on p.Id=pt.PostId
  INNER JOIN Tags t on pt.TagId = t.Id
  WHERE ph.PostHistoryTypeId=52  
GROUP BY t.Tagname)


SELECT 
  c.tagname,
  ROUND((CAST(counthot AS decimal))*100.0/(CAST(t.count AS decimal)),3) AS percentage,
  counthot, t.count
FROM counts_cte c INNER JOIN tags t ON c.tagname=t.tagname
WHERE t.count>=##num?100##
ORDER BY percentage DESC

Enter Parameters

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