select count(users.id), datepart(year, posts.creationdate...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select count(users.id), datepart(year, posts.creationdate) 
from users
left join posts on users.id = posts.owneruserid 
Where posttypeid not in (1, 2)
group by datepart(year, posts.creationdate);

Enter Parameters

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