I was browsing through SODE this morning and found this SODE query that claims I have cast 279 competing votes. Which got me wondering; for a vote to count towards the Sportsmanship badge, do you need to have at least +1 vote count on your own answer before voting on competing answers?
It is not uncommon for me to upvote other answers before my answers recieve any votes. If I do that, and then my answer gets a vote, does my competing upvote (retroactively) count towards this badge, or no?
This is all assuming that the query is sound and still up to date. It may just be an incorrect query; I am not very good with SQL!
DECLARE @UserId int = ##UserId## select distinct v2.postid as 'Own', p2.body as 'Own answer', p2.Score as 'Own score' from votes v2 inner join posts p2 on p2.id=v2.postid where p2.posttypeid=2 and p2.score>0 and p2.CommunityOwnedDate is null and p2.OwnerUserId=@UserId and exists (select * from votes v1 inner join posts p1 on p1.id=v1.postid where p1.ParentId=p2.ParentId)