How close am I to the Sportsmanship badge?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Count number of votes on competing answers

DevOps

Q&A for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure

-- How close am I to the Sportsmanship badge?
-- Count number of votes on competing answers

declare @UserId int = 1707091;

with UserPosts as (
  select
    Id as PostId
  from
    Posts
  where
    OwnerUserId = @UserId and
    CommunityOwnedDate is null and
    PostTypeId = 2 and
    Score >= 1
)

select
  distinct UserPosts.PostId
--  count(unique UserPosts.PostId) as UpVotes
from
  UserPosts
  inner join Votes on Votes.PostId = UserPosts.PostId
where
  VoteTypeId = 2

Enter Parameters

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