select tagname, count(*) from posts inner join (select di...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

select tagname, count(*) from posts inner join
(select distinct posts.id
from posts inner join
posthistory closed on closed.postid = posts.id and closed.posthistorytypeid = 10 inner join
posthistory edittags on edittags.postid = posts.id and edittags.posthistorytypeid = 6 and edittags.creationdate > closed.creationdate inner join
posthistory reopen on reopen.postid = posts.id and reopen.posthistorytypeid = 11 and reopen.creationdate > edittags.creationdate
where posts.closeddate is null) sq on sq.id = posts.id inner join
posttags on posttags.postid = posts.id inner join
tags on tags.id = posttags.tagid
group by tagname
order by 2 desc

Enter Parameters

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