Reproduce top tags for mutliple users with Data Explorer

by ThanksGuys   Last Updated June 13, 2019 09:24 AM

I want to reproduce the top tags overview for multiple users with the Data Explorer:

enter image description here

In the following I simplify for two users. The required solution should be able to scale to 50+ users.

What I found is that I can filter for a user and get the tags per post.

SELECT t.* FROM
(
SELECT Tags FROM
Posts
WHERE Id IN 
(
SELECT
    ParentId
FROM
    Posts
WHERE
    OwnerUserId = 3502164
    )
) AS t

What did I try?

Well usually the way would be to go with Count(tags), but the tags don't seem to be text. I found that one could attempt to link the results to the "tag-table", but I just got a lot of messy SQL code.

Sample desired Output:

enter image description here



Answers 1


The Tags field isn't really fit for analysis like this, and furthermore it's only filled for questions. You should join the PostTags and Tags table. I suspect you do like to experiment yourself, so here is a little help in this regard: a SEDE query listing a single user's score in each tag. It pretty much matches my profile:

enter image description here

Note that the 'POSTS' figure in the profile includes questions as well; this query doesn't. It's left as an exercise for the reader.

Glorfindel
Glorfindel
June 13, 2019 09:22 AM

Related Questions


Updated January 23, 2018 06:24 AM

Updated April 10, 2016 08:10 AM

Updated April 25, 2018 21:24 PM

Updated April 25, 2019 17:24 PM

Updated March 07, 2018 17:24 PM