2

I know I can use closed:1 to search closed questions and migrated:1 to search migrated questions on Stack Exchange sites.

Is there any way to search closed questions with reasons of primarily opinion-based, too broad and unclear what you're asking which are three major close reasons on SE sites?

1
  • 1
    I don't think it's possible using the search feature. You have to use SEDE. Commented Oct 8, 2016 at 10:54

1 Answer 1

5

You can only use SEDE for that. For a specific site the following query lists closed questions with the close reasons you asked:

select p.id as [Post Link]
     , crt.Name
     , crt.Description
from posts p 
inner join posthistory ph on ph.postid = p.id
inner join closereasontypes crt on crt.id = cast(ph.comment as tinyint)
where ph.posthistorytypeid = 10 -- Close event
and p.closeddate is not null  -- question is still closed
and p.posttypeid = 1 -- Question
and crt.id in 
    ( 103 -- unclear
    , 104 -- too broad
    , 105 -- POB
    )
order by closeddate desc

The query joins the posts table with posthistory and then filters on posthistorytypeid = 10 which indicates a closed event. In that row the comment field holds the foreignkey to the closereasonttypes. For Stack Overflow I had to add a top instruction to limit the number of results. Otherwise the query processor runs out of resources.

If you are unfamiliar with databases and SQL queries make sure to check out the SEDE Tutorial.

Keep in mind that SEDE is only updated updated once a week.

6
  • Thank you for your answer. As far as I remember, you need to have some reputation points (the highest on each site) to use it. Is my understanding wrong?
    – Rathony
    Commented Oct 8, 2016 at 15:27
  • @Rathony to use what exactly?
    – rene Mod
    Commented Oct 8, 2016 at 15:28
  • Isn't it Site Analytics? Sorry, I am not a program guy.
    – Rathony
    Commented Oct 8, 2016 at 15:32
  • @Rathony No, it is not. It is the public data dump. You can follow the links I provided, fork my query and customize it as you want. You don't even need an account (but you need to solve a captcha in that case)
    – rene Mod
    Commented Oct 8, 2016 at 15:33
  • 1
    @Rathony you might want to go over the great tutorial if you're not familiar with writing queries.
    – rene Mod
    Commented Oct 8, 2016 at 15:35
  • Oh, I was totally unaware of this. Thanks.
    – Rathony
    Commented Oct 8, 2016 at 15:37

You must log in to answer this question.

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