Users with most bookmarks on my posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers Meta

Q&A about the site for Drupal developers and administrators

SELECT TOP(##num?100##)
  v.Userid as [User Link],
  COUNT(p.Id) AS [Count]
FROM Posts p INNER JOIN Votes v ON p.Id=v.PostId
WHERE (p.OwnerUserId=##userid##) AND (v.VoteTypeId=5)
GROUP by v.UserId
ORDER BY COUNT(p.Id) DESC

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results