Heyyyyyyyyyyyy

0

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

--find number of users who didn’t post any questions in year2015--
SELECT COUNT(DISTINCT u.Id)
FROM Users u
LEFT JOIN Posts p ON u.Id = p.OwnerUserId AND YEAR(p.CreationDate) = 2015 AND p.PostTypeId = (SELECT Id FROM PostTypes WHERE Name = 'Question')
WHERE p.Id IS NULL;

Enter Parameters

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