How many upvotes do I have for each tag?

0

Please login or register to vote for this query.

(click on this box to dismiss)

how long before I get tag badges?

Music Fans Meta

Q&A about the site for music historians, critics, and fans

select thu.TagId, thu.UserId, thu.UpVotes from
    (SELECT
      Posts.OwnerUserId as UserId,
      Tags.Id as TagId,
      COUNT(*) AS UpVotes
      FROM Tags
        INNER JOIN PostTags ON PostTags.TagId = Tags.id
        INNER JOIN Posts ON Posts.ParentId = PostTags.PostId
        INNER JOIN Votes ON Votes.PostId = Posts.Id and VoteTypeId = 2
      where Posts.OwnerUserId is not null
      GROUP BY Tags.Id , OwnerUserId
    ) as thu, 
    (
      select pt.PostId as Post, pt.TagId as Tag from PostTags as pt, Posts as p
      where p.Id = pt.PostId and p.viewCount > 42000
    ) as tommy
    where thu.TagId = tommy.Tag
    group by thu.TagId, thu.UserId, thu.Upvotes
    order by thu.TagId, thu.UpVotes

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results