Q&A about the site for members of the workforce navigating the professional setting
with accepted as ( select top 20 owneruserid as userid, count(*) as 'approved' from suggestededits where approvaldate is not null group by owneruserid order by approved desc ), rejected as ( select top 20 owneruserid as userid, count(*) as 'rejected' from suggestededits where rejectiondate is not null group by owneruserid order by rejected desc ) select a.userid as [User Link], a.userid, coalesce(approved, 0), coalesce(rejected, 0) from accepted a full outer join rejected r on a.userid = r.userid