Q&A for administrators and users of the CiviCRM Constituent Relationship Management software
SELECT TOP 20 CONCAT ('http://superuser.com/q/', Posts.Id) as Question FROM PostHistory JOIN Posts ON Posts.Id = PostHistory.PostId WHERE Posts.ClosedDate >= '2012-09-01' AND Posts.ClosedDate < '2012-12-01' AND PostHistoryTypeId = 10 AND PostHistory.Comment != 1 ORDER BY NEWID()