Posts by authors for the last 30 days

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 U.DisplayName, PP.pcount
FROM USERS AS U 
JOIN (
  SELECT P.OwnerUserId, count(distinct P.id) AS pcount
  FROM Posts AS P
  WHERE P.CreationDate >= DATEADD(d, -30, GETDATE())
  GROUP BY P.OwnerUserId
) AS PP
ON U.Id = PP.OwnerUserId 
ORDER BY PP.pcount DESC;

Enter Parameters

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