What tag brought a user to the site?


Please login or register to vote for this query.

(click on this box to dismiss)

This will figure out some statistics as to what tags bring users to a site, and how long they stick around.

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

WITH FirstPosts AS (
    SELECT OwnerUserId as SEUser,
           Min(Id) as Post
    FROM Posts
    GROUP BY OwnerUserId
UserQuestionCount AS (
  SELECT count(Id) AS PostCount, OwnerUserId AS Id
  FROM Posts
  GROUP BY OwnerUserId

SELECT TOP 100 t.tagname, 
  count(Tags) AS Users, 
FROM FirstPosts INNER JOIN Users on FirstPosts.SEUser = Users.Id
                INNER JOIN Posts on FirstPosts.Post = Posts.Id
  INNER JOIN PostTags pt on Posts.Id = pt.PostId
  INNER JOIN Tags t on pt.TagId = t.Id
  INNER JOIN UserQuestionCount ON Users.Id = UserQuestionCount.Id
  WHERE UserQuestionCount.PostCount>1
  GROUP BY t.tagname HAVING count(Tags)>10 

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results