Select p.Id as [Post Link], SUM(Case When pf.VoteTypeId =...

0

Please login or register to vote for this query.

(click on this box to dismiss)

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

Select
   p.Id as [Post Link],
   SUM(Case When pf.VoteTypeId = 2 Then 1 ELSE 0 END) AS UpFeedback,
   SUM(Case When pf.VoteTypeId = 3 Then 1 ELSE 0 END) AS DownFeedback,
   p.OwnerUserId AS [User Link],
   p.Score AS Score
FROM
  PostFeedback pf
FULL OUTER JOIN Posts p ON p.Id = pf.PostId
WHERE p.Id = ##PostId##
     OR p.ParentId = ##PostId##
GROUP BY p.Id, p.OwnerUserId, p.Score, p.CreationDate
ORDER BY p.CreationDate

Enter Parameters

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