Posts each day of week by users less than one week old (1 year)


Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT DATEPART(weekday, p.CreationDate), COUNT(*) 
FROM Users u
JOIN Posts p ON u.Id = p.OwnerUserId
WHERE p.CreationDate > DATEADD(day, -364, GETUTCDATE())
  AND ABS(DATEDIFF(day, p.CreationDate, u.CreationDate)) < 7
GROUP BY DATEPART(weekday, p.CreationDate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results