Hours a tag has a close vote

0

Please login or register to vote for this query.

(click on this box to dismiss)

Shows the tag that has a close vote and is not yet closed with the number of hours it is open...

Stack Overflow

Q&A for programmers

select top 200
       t.tagname
       , max(datediff(hh, v.creationdate, getdate())) as maxhours
       , max(datediff(d, v.creationdate, getdate())) as maxdays
       , max(datediff(ww, v.creationdate, getdate())) as maxweeks
       , max(datediff(m, v.creationdate, getdate())) as maxmonths
       , max(datediff(yy, v.creationdate, getdate())) as maxyears
       , avg(datediff(d, v.creationdate, getdate())) as avgdays
       , count(*) as cnt
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 votetypeid = 6
and p.closeddate is null
group by t.tagname
having count(*) > 1000
order by 2 desc

Enter Parameters

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