Users' upvotes

0

Please login or register to vote for this query.

(click on this box to dismiss)

A bit more unbiased insight than reputation

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

-- Users' upvotes
-- A bit more unbiased insight than reputation

select Users.Id as UID,
 sum(case when VoteTypeId=2 then 1 end) as totalUpvotes,
 sum(case when VoteTypeId=2 and PostTypeId=1 then 1 end) as totalQueUpvotes, 
 sum(case when VoteTypeId=2 and PostTypeId=2 then 1 end) as totalAnsUpvotes
from Votes inner join Posts on Posts.Id=Votes.PostId 
 inner join Users on Users.Id=Posts.OwnerUserId
where users.id = 239378
group by Users.Id
order by Users.Id

Enter Parameters

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