select u.id, u.displayname, year(p.creationdate), count(p...

0

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.id, u.displayname, year(p.creationdate), count(p.id) as 'count of posts'
, count(u.id) as 'count of users '
from users u
join posts p on p.owneruserid = u.id
join posttypes pt on pt.id = p.posttypeid
where pt.id = 1 
--and u.location like '%Ru%'
group by u.id, u.displayname, p.creationdate
--order by year(p.creationdate) desc

Enter Parameters

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