Top tag polls

1

Please login or register to vote for this query.

(click on this box to dismiss)

Signal Processing Meta

Q&A about the site for practitioners of the art and science of signal, image and video processing

WITH Raw AS (
  SELECT
    Q.OwnerUserId AS UserId,
    PostTags.TagId,
    SUM(5 - Votes.VoteTypeId) AS Score
  FROM PostTags, Posts Q, Posts A, Votes
  WHERE
    A.ParentId = Q.Id
    AND
    Votes.PostId = A.Id
    AND
    Votes.VoteTypeId BETWEEN 2 AND 3
    AND
    Q.Id = PostTags.PostId
    AND
    A.OwnerUserId > 0
  GROUP BY Q.OwnerUserId, PostTags.TagId
),
Raw2 AS (
  SELECT UserId, MAX(Score) AS MaxScore
  FROM Raw
  GROUP BY UserId
),
Raw3 AS (
  SELECT Raw.UserId, Raw.TagId
  FROM Raw, Raw2
  WHERE
    Raw.UserId = Raw2.UserId
    AND
    Raw.Score = Raw2.MaxScore
    AND
    Raw2.MaxScore > ##MinScore:int?10##
)
SELECT
  MIN(Tags.TagName) AS TagName,
  COUNT(*) AS N
FROM Raw3, Tags
WHERE Raw3.TagId = Tags.Id
GROUP BY Raw3.TagId
ORDER BY N DESC

Enter Parameters

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