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?

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

-- How many upvotes do I have for each tag?
-- how long before I get tag badges?

set nocount on

declare @userId int = ##UserId:int##
declare @topTags table (id int, name nvarchar(35), questionCount int)
insert @topTags
select top 40 Id, TagName, Count from Tags order by Count desc

set nocount off

select tt.id as [Tag Link], SUM(Posts.Score) as score from @topTags tt
inner join PostTags on PostTags.TagId = id
inner join Posts on Posts.ParentId = PostTags.PostId
where Posts.OwnerUserId = @userId and Posts.CommunityOwnedDate is null
group by tt.id order by score desc

Enter Parameters

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