Vote count per post


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.

Ask Different Meta

Q&A about the site for power users of Apple hardware and software

-- 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

Switch sites:
loading Hold tight while we fetch your results