Vote count per post

0

Please login or register to vote for this query.

(click on this box to dismiss)

For when you haven't been granted the "privilege" yet.

Christianity Meta

Q&A about the site for committed Christians, experts in Christianity and those interested in learning more

-- Enter Query Title
-- Enter Query Description
DECLARE @PostId int  = ##PostId##

SELECT vt.Name, COUNT(*) 
FROM Votes v
  INNER JOIN VoteTypes vt ON v.VoteTypeId = vt.Id
WHERE v.PostId = @PostId
GROUP BY vt.Name

Enter Parameters

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