How many downvotes do I get per tag?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select TagName, 
       count(distinct v.Id) downvotes, 
       count(distinct p.Id) posts
from Posts p
     join Posts q on isnull(p.ParentId, p.Id) = q.Id
     join Votes v on v.PostId = p.Id
     join PostTags pt on pt.PostId = q.Id
     join Tags t on TagId = t.Id
where VoteTypeId = 3
      and p.OwnerUserId in (##user?1438##)
group by TagName
order by count(*) desc

Enter Parameters

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