# 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:** [20.Апрель.2017 17:31:52 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:** 20
**Page:** 1

<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: [20.Апрель.2017 17:31:52 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/1 "2017-04-20T17:31:52Z")

</div>

As I get ready to open up my community to our partners and customers, we’re looking at using the user summary table ([example.com/users](http://example.com/users)) to help monitor what our SE community is doing.

One of the things I noticed is that while it counts likes, posts, visits, etc., it doesn’t show a count of how many items the user posted that were then marked solved. This could be very valuable for our managers to see who’s contributing and also solving issues.

I couldn’t find anything in the admin console to enable this, so it may be a feature request. I’m also on a hosted solution if that makes any difference, but I didn’t see anything in the plugin settings.

Thanks,  
Andy

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20.Апрель.2017 17:33:33 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/2 "2017-04-20T17:33:33Z")

</div>

> [@awlogan](#):
>
> , it doesn’t show a count of how many items the user posted that were then marked solved.

Seems to be working here:

 ![](https://global.discourse-cdn.com/meta/original/3X/9/a/9a1e3aceb5ad77a6d891c86dfd922201665cd7ca.png)

If you are looking for the **reverse** number, well yeah, that does not exist.

Eg: `Question that were Solved by the community: 100`

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [20.Апрель.2017 17:34:22 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/3 "2017-04-20T17:34:22Z")

</div>

Working here as well! can post screenshot just in case!

---

<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: [20.Апрель.2017 17:35:21 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/4 "2017-04-20T17:35:21Z")

</div>

Hi guys,

I’m actually talking about it on a per-user basis on the /users summary table. That way I don’t have to click through all 200 employees one at a time.

thanks,  
Andy

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [20.Апрель.2017 17:38:10 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/5 "2017-04-20T17:38:10Z")

</div>

That seems like a custom requirement!

---

<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: [20.Апрель.2017 17:39:24 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/6 "2017-04-20T17:39:24Z")

</div>

That’s why I’m asking, Discourse does a really good job of summarizing data, but this one is missing and would be really useful. This is the summary I’m talking about.

 ![](https://global.discourse-cdn.com/meta/original/3X/9/3/93adf41e46c3ef80261f4d713f98c7a3ea08c32e.png)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [20.Апрель.2017 17:40:16 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/7 "2017-04-20T17:40:16Z")

</div>

But Discourse-Solved is a Plugin … if it were an integrated feature, it may have been integrated better than how it is now.

---

<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: [20.Апрель.2017 17:43:58 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/8 "2017-04-20T17:43:58Z")

</div>

Understand it’s a feature request which is what I figured. It would certainly make it more useful for tracking what users are up to if I want to make participation in the community something I can track and report on for leadership.

thanks,  
Andy

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [20.Апрель.2017 17:45:00 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/9 "2017-04-20T17:45:00Z")

</div>

Try Github [GitHub - discourse/discourse-solved: Allow accepted answers on topics · GitHub](https://github.com/discourse/discourse-solved) and raise a request there maybe?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20.Апрель.2017 17:47:07 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/10 "2017-04-20T17:47:07Z")

</div>

No … requests for #plugin:solved belong here, this topic is fine.

Not sure about amending the list in `/users` there, it is huge already and it would be a rather complex change.

---

<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: [20.Апрель.2017 17:48:17 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/11 "2017-04-20T17:48:17Z")

</div>

Would there be a way to run it as a report instead with basically the same info? This is probably at best something I need to provide quarterly in my case, others may have different requirements.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20.Апрель.2017 17:49:04 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/12 "2017-04-20T17:49:04Z")

</div>

> [@awlogan](#):
>
> This is probably at best something I need to provide quarterly in my case, others may have different requirements.

Yeah writing a custom report should be fairly simple, you can do it with some SQL skills and the [data explorer](https://meta.discourse.org/t/32566?silent=true) plugin.

---

<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: [20.Апрель.2017 17:50:39 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/13 "2017-04-20T17:50:39Z")

</div>

OK thanks, I’ll give that a try and see what I can pull out.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20.Апрель.2017 17:51:35 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/14 "2017-04-20T17:51:35Z")

</div>

If you come up with a query, be sure to share it here 😉

---

<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: [20.Апрель.2017 17:52:46 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/15 "2017-04-20T17:52:46Z")

</div>

Will do, hopefully I’ll get some time to work on it this week, thanks again!

---

<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: [26.Апрель.2017 23:43:40 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/16 "2017-04-26T23:43:40Z")

</div>

Following up, I can get the data when there is a solution selected using the following:

```
SELECT value
FROM
    post_custom_fields
WHERE  
    name = 'is_accepted_answer'

```

What I’m getting back is either ‘true’ which I expect from looking through the plugin code. There is one NULL, I am going to assume that this is from someone who checked a solution box then unchecked it. Unfortunately I can’t seem to get it to show other users who have 0 solved solutions when I try to build out the dashboard like you see at [Discourse Meta](http://meta.discourse.com/users).

It’s possible it’s just my rusty SQL skills and maybe I’m missing something obvious in how to display the rest of my user base with 0 matches. I tried matching on NULL (1 match) and an empty string but that didn’t provide any additional output.

I can certainly run it today as there are only 7 of us with solved solutions as most of my users interact via email, but as we get ready to open this up to our user and partner base I’m guessing that will go up. If anyone has any pointers I’d appreciate it.

---

<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: [03.Май.2017 22:23:03 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

```

---

<div class="post-metadata">

### Author: ![Jason\_Schulke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jason_schulke/32/178176_2.png) [@Jason\_Schulke](https://meta.discourse.org/u/Jason_Schulke)
#### Post date: [15.Май.2020 18:55:20 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/18 "2020-05-15T18:55:20Z")

</div>

@awlogan это очень полезно, нам как раз нужен был такой запрос! Есть ли возможность добавить отчетность по датам? В идеале я хотел бы видеть общее количество решений на человека по дням или неделям.

---

<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: [15.Май.2020 20:41:48 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/19 "2020-05-15T20:41:48Z")

</div>

Привет @Jason_Schulke, у меня есть диапазоны дат для таких задач, как подсчёт количества регистраций не сотрудников за квартал, с использованием диапазонов дат вроде этого:

```
WHERE u.created_at BETWEEN '2020-05-01' AND '2020-07-31'

```

Не уверен, есть ли у поля solved дата, так как честно говоря, мне это не понадобилось в этом поиске, но это может стать отправной точкой для вас.

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [14.Июнь.2023 20:38:55 UTC](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342/20 "2023-06-14T20:38:55Z")

</div>

Просто уточняем, есть ли какие-то новости по этому вопросу. Нам тоже очень нравится эта идея, и мы хотим мотивировать участников сообщества отвечать на вопросы с помощью таблицы лидеров, мерча и т. д.

[Next page](https://meta.discourse.org/t/can-we-display-solved-count-on-the-users-page/61342.md?page=2)
