Attention of Bug reports and feature requests

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT  
   t.tagname,
   t.count,
   count(s_t.tagname) Status_Count,
   (count(s_t.tagname))/cast(t.count as decimal(20,5) )  as Ratio
FROM
  posts p 
  INNER JOIN POSTTAGS pt
  on p.id = pt.PostId
  INNER JOIN tags t 
    ON pt.TagId = T.Id
  LEFT JOIN POSTTAGS s_pt
    INNER JOIN tags s_t
      ON s_pt.TagId = s_t.Id
      and s_t.TagName like 'status%'
  on p.id = s_pt.PostId
WHERE  
  t.TagName in ('support', 'bug', 'feature-request')
GROUP BY 
   t.tagname,
   t.count

Enter Parameters

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