Top commenter 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##)
  c.UserId as [User Link], c.UserDisplayName, 
  COUNT(c.Id) AS [Count], SUM(c.Score) AS [Score]
FROM Posts p INNER JOIN Comments c ON p.Id=c.PostId
WHERE (p.OwnerUserid=##userid##)
GROUP by c.UserId, c.UserDisplayName
ORDER BY COUNT(c.Id) DESC

Enter Parameters

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