Q&A about the site for members of the workforce navigating the professional setting
select top 10 u.id as [User Link], (count(p.id) + count(c.id)) as Total_Posts_Comments from posts p left join comments c on c.postid = p.id left join users u on u.id = p.owneruserid where (datediff(year, current_timestamp, p.creationdate) >= -5 or datediff(year, current_timestamp, c.creationdate) >= -5) group by u.id order by Total_Posts_Comments desc