select sum(case when reopened.id IS NULL THEN 0 ELSE 1 EN...

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 sum(case when reopened.id IS NULL THEN 0 ELSE 1 END) * 1.0 /
sum(1.0)
from (select distinct posts.id
from posts inner join
posthistory on posts.id = posthistory.postid and
posthistory.posthistorytypeid = 10) closed left join
(select distinct posts.id
from posts inner join
posthistory on posthistory.postid = posts.id and
posthistory.posthistorytypeid = 11
where closeddate IS NULL) reopened on closed.id = reopened.id

Enter Parameters

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