Most-voted Posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Top 50 Posts with the most Votes

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

-- Most-voted Posts
-- Top 50 Posts with the most Votes

set nocount off

SELECT TOP 20
  p.Title,
  COUNT(*) as NumVotes
FROM Posts p
INNER JOIN Votes v ON (v.PostId=p.Id)
WHERE p.PostTypeId=1 and p.OwnerUserId!=1
GROUP BY p.Id, p.Title, p.PostTypeId
ORDER BY NumVotes DESC

Enter Parameters

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