Q&A for linguists, teachers and students of the Korean language
SELECT * FROM( SELECT ROW_NUMBER() OVER(ORDER BY COUNT(1) DESC) rn ,t.tagname ,COUNT(1) AS post_count FROM tags t JOIN posttags pt ON t.id = pt.tagid JOIN posts p ON pt.postid = p.id WHERE YEAR(p.creationdate) = YEAR(SYSDATETIME()) GROUP BY t.tagname) s where s.rn <= 5 GROUP BY s.rn ,s.tagname, s.post_count ORDER BY COUNT(1) DESC