SELECT TOP 10 Posts.Id, COUNT(PostTags.PostId) AS TagCoun...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

SELECT TOP 10 Posts.Id, 
  COUNT(PostTags.PostId) AS TagCount
FROM Posts INNER JOIN PostTags 
  ON PostTags.PostId = Posts.Id
WHERE Posts.PostTypeId = 1 
  AND (SELECT COUNT(*) FROM PostTags WHERE PostId = Posts.Id) = 5
GROUP BY Posts.Id
ORDER BY TagCount DESC, NEWID()

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results