# Can we display solved count on the /users page?

**URL:** <https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342>\
**Category:** Feature\
**Tags:** solved, completed\
**Created:** [Avril 20, 2017, 5:31 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342 "2017-04-20T17:31:52Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![awlogan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awlogan/32/62208_2.png) [@awlogan](https://meta.discourse.org/u/awlogan)\
**Post date:** [Mai 3, 2017, 10:23 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/17 "2017-05-03T22:23:03Z")

</div>

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

```

---

_[View the full topic](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342)._
