Based on the existing advanced search options, I expected a comments:# to exist so I can search posts depending on the number of comments they have applied to them; at worst, I expected a hascomments. Either I missed them, or neither exists.

Is there a reason search posts by number of comments doesn't exist beyond it simply not having been implemented yet? If no, then please consider this a request to implement the functionality.

This is different from the search comments requests, which request solutions for searching within comments themselves. This question asks for the ability to search by number of comments.

  • not against this, just curious why you'd want this capability?
    – Daniel
    Aug 12, 2013 at 17:33
  • Tumbleweed hunting.
    – JoshDM
    Aug 12, 2013 at 17:34
  • 4
    To elaborate, many questions have no answers, but are being worked via the comment system, and might not need any additional eyes. This would help find questions that are being ignored from both the answer and comment aspects. Hence the reference to "hascomments" as an alternative option.
    – JoshDM
    Aug 12, 2013 at 17:36
  • 2
    In the place where Advanced Search fails, Data Explorer comes to the rescue. :-) Aug 12, 2013 at 17:45
  • 2
    In the place where you broke your hammer, hit it with your wrench turned sideways. :-)
    – JoshDM
    Aug 12, 2013 at 19:53
  • I wish this question had been taken seriously. I'm looking for a proper answer.
    – rhermans
    Jul 31, 2018 at 20:23
  • I was too, unfortunately we got derp.
    – JoshDM
    Jul 31, 2018 at 20:24
  • 3
    I would have loved an answer to this, too. I would love to search for questions that have zero score, no answers, and two or more comments - because these are not auto-deleted see point 10 on this list, but very likely are candidates for such deletion, in which case one can cast a single downvote to push them over the deletion edge (point 9 in the list of auto-deletions). It's a pity this is impossible. Searching just on the first two criteria at CV gives over 16,000 hits. Sep 18, 2019 at 10:17

1 Answer 1


To me it seems like the Comments table has information about the parent PostId such that we can make it work like this:

SELECT TOP(##num##)
  COUNT(a.Id), a.PostId AS [Post Link], b.Score
FROM Comments a inner join Posts b ON b.Id = a.PostId 
WHERE a.creationdate >= '8/1/2010'
GROUP BY a.PostId, b.Score


I see now that it is not about searching the posts by sql but instead by using the search function. Well, anyway, now there is this workaround.

  • 2
    +1, It would be nice to be able to specify only questions, only answers, or both (current version), & to be able to constrain results to a score or date range, given the reason for this request. Sep 19, 2019 at 15:59
  • How do I use this to search for posts sorted by comments on rpg.stackexchange.com ?
    – Akixkisu
    Dec 11, 2020 at 12:08

You must log in to answer this question.

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