Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
WITH top_posts AS(SELECT p.Id, pt.TagId, p.Score FROM Posts p INNER JOIN PostTags pt ON p.Id = pt.PostId WHERE year(p.CreationDate) = '2017') SELECT Top 10 TagName, [Count], Score FROM Tags t INNER JOIN top_posts tp ON t.Id = tp.TagId GROUP BY TagName, [Count], Score ORDER BY Count DESC