# How do I see who is marking solved and on what?

**URL:** <https://meta.discourse.org/t/how-do-i-see-who-is-marking-solved-and-on-what/63981>\
**Category:** Data & reporting\
**Tags:** solved, sql-query\
**Created:** [2017年六月5日 19:34 UTC](https://meta.discourse.org/t/how-do-i-see-who-is-marking-solved-and-on-what/63981 "2017-06-05T19:34:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [2017年六月5日 23:31 UTC](https://meta.discourse.org/t/how-do-i-see-who-is-marking-solved-and-on-what/63981/4 "2017-06-05T23:31:49Z")

</div>

I was interested to see these stats for my instance as well, so had a go at making some queries for [data explorer](https://meta.discourse.org/t/32566?silent=true):

To list each individual “solved” event:

```SQL
SELECT acting_user_id, target_topic_id, target_post_id, created_at FROM user_actions
WHERE action_type=15
ORDER BY created_at DESC

```

To produce a list with stats per-user: (with variable for time interval, defaults to 1 year):

```SQL
-- [params]
-- string :interval = 1 year
SELECT ua.acting_user_id, 
        count(case t.user_id when ua.acting_user_id then 1 else null end) as is_op, 
        count(case t.user_id when ua.acting_user_id then null else 1 end) as not_op,
        count(*) as total
FROM user_actions ua
LEFT JOIN topics t ON target_topic_id = t.id
WHERE action_type=15
AND ua.created_at >= CURRENT_DATE - INTERVAL :interval
GROUP BY ua.acting_user_id
ORDER BY total DESC

```

 ![data](https://global.discourse-cdn.com/meta/original/4X/e/1/1/e11a6cc7c7a5e7ba652a0da369dc9710cfb21335.png)

~~Edit: actually, this data is somewhat wrong… I’ll attempt to fix it~~  
Edit 2: Since this logging was only added to the plugin [6 months ago](https://github.com/discourse/discourse-solved/commit/026f7a3ab06150e3d4fdfca37ea7b9ea5e58d5f1), any data before that will have the “acting\_user” set to the OP of the topic, regardless of who actually clicked the button. I think anything less than 6 months old should be correct.

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-see-who-is-marking-solved-and-on-what/63981)._
