Hubris - Exploration

0

Please login or register to vote for this query.

(click on this box to dismiss)

Last answer added to a question, sorted by the (then) top answer's score (at this answers creation time.)

Engineering

Q&A for professionals and students of engineering

--SELECT LastAnswer.Id AS [Post Link]
--FROM Posts as LastAnswer
--WHERE
--    PostTypeId = 2
--    AND CreationDate = (
--      SELECT MAX(OtherAnswersToSameQuestion.CreationDate)
--      FROM Posts as OtherAnswersToSameQuestion
--      WHERE OtherAnswersToSameQuestion.ParentId = LastAnswer.ParentId
--    )

SELECT SUM(
  CASE 
    WHEN Votes.VoteTypeId = 2 THEN 1
    WHEN Votes.VoteTypeId = 3 THEN -1
    ELSE 0 
   END
   ) as Score
FROM Votes
WHERE
   CreationDate < '2011-08-05'
   AND PostId = 71

Enter Parameters

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