Q&A for professional and enthusiast programmers
-- Enter Query Title -- Enter Query Description DECLARE @UserId int = ##UserId## SELECT TOP 20 TagName, (SELECT COUNT(*) FROM PostTags INNER JOIN Posts ON Posts.ParentId = PostTags.PostId WHERE Posts.OwnerUserId = @UserId AND Posts.CommunityOwnedDate IS NULL AND Posts.PostTypeId = 2 AND PostTags.TagId = Tags.Id ) AS PostCount FROM Tags ORDER BY PostCount DESC