Question 2 Response

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

select top 10 u.id as [User Link], (count(p.owneruserid) + count(c.userid)) as Total_Posts_Comments
from users u
left join posts p on u.id = p.owneruserid
left join comments c on u.id = c.userid
where p.creationdate >= dateadd(year, -5, current_timestamp)
group by u.id, p.owneruserid, c.userid
order by Total_Posts_Comments desc

Enter Parameters

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