My unfortunate answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Accepted answers with zero or negative score sorted by views

Stack Overflow

Q&A for professional and enthusiast programmers

-- My unfortunate answers
-- Accepted answers with zero or negative score

DECLARE @userid int = ##UserID##

SELECT 
  myAnswer.Score as 'Votes',
  myAnswer.id as [Post Link], 
  question.ViewCount as 'Views', 
  question.Tags as 'Tags'
FROM 
  Posts question JOIN Posts myAnswer ON question.AcceptedAnswerId = myAnswer.Id
WHERE
  myAnswer.Score < 1 AND myAnswer.OwnerUserId = @userid
ORDER BY question.ViewCount DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results