Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I've been trying to find this on the data explorer, but no luck. I need some help to write a query identical to the one found on our profile pages that displays tag information. The query would have to return:

  1. Each tag used by the user
  2. The number of times this tag has been used.
  3. The number of points gained for answers given to questions that use this tag.

I wrote the following so far on data-explorer to get the tags and to the tag count:

SELECT COUNT(tags.tagName), tags.tagName
  FROM postTags
    LEFT JOIN tags ON postTags.tagId =
    LEFT JOIN posts ON postTags.postId =
  WHERE posts.ownerUserId = 3
  GROUP BY tags.tagName

But I'm not sure how to get the score count per answer, or item 3 in my list!

Any help would appreciated!

share|improve this question

You're on the right track.

I created a query that does a decent approximation:

The only difference between this and the My Tags area is that this doesn't include community-wiki post stats (they don't count towards the totals, but the number of posts is included). The query would have to be rewritten slightly to grab data from the Votes table instead (to find the non-CW votes before the post was converted). This is exact if you don't have any CW posts.

share|improve this answer
thanks. I guess adding that column goes a long way to complicate the query, huh? I'll have to spend some time playing around with it to see what I can do. I'm debating if it's even worth it at this point--unless I can find a way to do it without creating an additional table on the fly... – Mohamad Jun 16 '11 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .