Q&A for those using, extending or developing Emacs
SELECT TOP 10 p.Id, COUNT(pt.PostId) AS TagCount FROM Posts p INNER JOIN PostTags pt ON pt.PostId = p.Id WHERE p.PostTypeId = 1 AND (SELECT COUNT(*) FROM PostTags WHERE PostId = p.Id) > 5 GROUP BY p.Id ORDER BY TagCount DESC, NEWID()