What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Are there any stats about the percentage of close reasons used to close questions

  • Successfully (preferably, based on the number of closed questions)
  • Unsuccessfully (alternatively, the total percentags of close votes cast by users)

?

Is there any way to get this from the query explorer?

share|improve this question
    
Probably not from SEDE, as close votes expire. –  waiwai933 Jan 9 '11 at 11:35
    
@waiwai ah, true. Hadn't thought of that. @Developers, is there a chance of getting that info? (Just if it isn't too much trouble, I'm just looking for background info for a feature suggestion) –  Pëkka Jan 9 '11 at 11:36

2 Answers 2

up vote 8 down vote accepted

Unsuccessfully -- no, when close votes disappear from the system, they are hard-deleted, so they physically don't exist anymore (except in backups, I suppose).

Successfully -- yes, the CloseReasonId is actually stuffed into the Comment field in PostHistory (I've updated the docs to reflect this). I created a query to summarize how frequently questions are closed by type of close. You can calculate the percentages from this quite easily.

Also, for the curious, I created another query to show how you have voted to close in successfully closed questions.

share|improve this answer
    
Sweet, exactly what I was looking for (well, minus the "Unsuccessfully" part, but I kind of expected that). Thank you very much! –  Pëkka Jan 9 '11 at 19:41
    
@Pekka: You're welcome! I was curious why there was no CloseReasonId column in PostHistory, so it was good to figure this out. –  Jon Seigel Jan 9 '11 at 19:45
    
@Jon, where is the vote close reason stored? Nothing makes it to the history table unless the post is closed. This info, however, must get stored somewhere. The most common close reason is noted if more than one reason is used. Does the votes table have extra columns not visible on SEDE? Like a closeReasonId or something? –  Mohamad Aug 11 '11 at 3:16
    
@Mohamad: meta.stackexchange.com/questions/99311/… –  Jon Seigel Aug 11 '11 at 4:28

As the CloseReason are now part of SEDE I've created queries that use those tables:

Here is the close statistics for non-deleted posts

select case 
       when crt.id in (1,101) then 'duplicate' 
       when crt.id in (2,102) then 'off topic'
       else crt.name
       end as [name]
       , count(ph.id) as [count]
from posthistory ph
inner join CloseReasonTypes crt 
        on crt.id = cast(ph.comment as int)
where posthistorytypeid = 10
group by case 
       when crt.id in (1,101) then 'duplicate' 
       when crt.id in (2,102) then 'off topic'
       else crt.name
       end 

Here I combined the two separate duplicate and off topic close reasons into one, based on @ShadowWizards comment. In the next query I leave that out so you can see if the change of reasons and the subtle new guidance that came with their introduction made a difference for you.

And this one shows your own favourite close reasons:

select crt.name
     , count(ph.id) as [count]
from posthistory ph
inner join CloseReasonTypes crt 
        on crt.id = cast(ph.comment as int)
where posthistorytypeid = 10
and   text like '%"Id":' + ##Userid:string## + ',%'
group by crt.name

Final note: SEDE is update once a week and doesn't hold deleted posts.

share|improve this answer
    
Nice! However, two bugs: i.stack.imgur.com/BAdSP.png can those reasons be merged? –  Shadow Wizard Dec 21 at 13:04
    
But aren't they technically different reasons, also with slightly different characteristics? –  rene Dec 21 at 13:05
    
Looks like the close reason name was simply changed over time, no? –  Shadow Wizard Dec 21 at 13:09
    
No, yes, maybe. Anyway... a compromise, is this fine? –  rene Dec 21 at 13:41
    
Perfect! Already got my +1 but I would have given another one ;) –  Shadow Wizard Dec 21 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .