Q&A for people interested in statistics, machine learning, data analysis, data mining, and data visualization
-- This filters question with only a single tag -- Not quite sure why -- [SELECT * FROM Posts WHERE Tags = 'r'] -- does not work WITH TagCount AS ( SELECT COUNT(*) AS TagN, MIN(TagId) AS TagId, PostId FROM PostTags GROUP BY PostId ) , SingleTags AS ( SELECT TagCount.PostId, TagCount.TagId, Tags.TagName FROM TagCount LEFT JOIN Tags ON TagCount.TagId = Tags.Id WHERE TagCount.TagN = 1 AND Tags.TagName = '##TagName##' ) SELECT * FROM SingleTags LEFT JOIN Posts ON SingleTags.PostId = Posts.Id ORDER BY CreationDate DESC