most common comments by new users

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP ##topn:int?200## Text,COUNT(*) AS num,MIN(c.Id) AS [Comment Link]
FROM Comments c INNER JOIN Users u ON c.UserId=u.Id
WHERE u.Reputation<=##maxrep:int?10## AND
   NOT (Lower(Text) Like Lower(##excludepattern:string?thank%##)
          AND LEN(Text)<=##excludemaxlen:int?30##)
GROUP BY Text
ORDER BY COUNT(*) DESC

Enter Parameters

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