close votes per tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select tag
, count(*) as [count]
from
(
select distinct
       t.tagname as tag
     , p.id  
 from votes v
 inner join posts p 
    on p.id = v.postid
 inner join posttags pt 
    on pt.postid = p.id
 inner join tags t 
    on t.id = pt.tagid
 where v.votetypeid = 6 -- close
 and p.posttypeid = 1 -- question
 and p.closeddate is null
 ) as tqc
 group by  tag
 order by count(*) desc

Enter Parameters

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