Please login or register to vote for this query.

(click on this box to dismiss)

Constructed Languages

Q&A for designers and users of artificial or invented languages, consciously developed instead of having developed naturally

SELECT p.Id                                                           AS [Post Link],
       SUM(CASE f.VoteTypeId WHEN 2 THEN 1 WHEN 3 THEN -1 ELSE 0 END) AS [Feedback Score],
       SUM(CASE WHEN f.VoteTypeId = 2 THEN 1 ELSE 0 END)              AS Helpful,
       SUM(CASE WHEN f.VoteTypeId = 3 THEN 1 ELSE 0 END)              AS Unhelpful,
       p.Score                                                        AS [Actual Score]
FROM   Posts p
       JOIN PostFeedback f
         ON f.PostId = p.Id
WHERE  p.Id = ##PostId:int##
GROUP  BY p.Id, p.Score

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results