Here is the solution I have. I am filtering by group ID as that’s my employee group that I have everyone added to when they sign up:
SELECT u.username,
u.name,
us.likes_given,
us.likes_received,
us.topic_reply_count,
us.post_count,
us.posts_read_count,
us.topic_count,
COUNT(pc.name) AS solved
FROM
users u
JOIN
posts p ON p.user_id = u.id
LEFT JOIN
post_custom_fields pc ON pc.post_id = p.id
JOIN
user_stats us ON us.user_id = u.id
WHERE u.primary_group_id = [GROUP ID]
AND pc.name = 'is_accepted_answer'
GROUP BY u.id,
us.likes_given,
us.likes_received,
us.topic_reply_count,
us.post_count,
us.posts_read_count,
us.topic_count