Your tag activity

1

Please login or register to vote for this query.

(click on this box to dismiss)

Your count of posts (question + answer) by tag.

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

DECLARE @UserId INT;
DECLARE @Ups INT;
DECLARE @Downs INT;

SELECT @UserId = Id FROM Users WHERE AccountId = ##SEAccountId:int##;

WITH Raw AS (
  SELECT Posts.Id, PostTags.TagId
  FROM Posts, PostTags
  WHERE
    Posts.OwnerUserId = @UserId
    AND
    PostTags.PostId = Posts.Id

  UNION

  SELECT Posts.Id, PostTags.TagId
  FROM Posts, PostTags
  WHERE
    Posts.OwnerUserId = @UserId
    AND
    PostTags.PostId = Posts.ParentId
)
SELECT
  MIN(Tags.TagName) AS TagName,
  COUNT(*) AS Count
FROM Raw, Tags
WHERE
  Raw.TagId = Tags.Id
GROUP BY Raw.TagId
ORDER BY Count DESC, Raw.TagId

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results