Number of active users with >= 1 post in last 30 days

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

-- Number of active users with >= 1 post in last 30 days
-- Enter Query Description

SELECT 
  COUNT(DISTINCT Users.id)
FROM 
  Users
JOIN 
  Posts ON (Posts.OwnerUserId = Users.Id)
WHERE 
  DATEDIFF(day, Posts.CreationDate, GETDATE()) < 30
  

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached