# 追踪谁发送了私信

**URL:** <https://meta.discourse.org/t/tracking-who-sent-private-messages/95607>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [2018年八月24日 22:19 UTC](https://meta.discourse.org/t/tracking-who-sent-private-messages/95607 "2018-08-24T22:19:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nexo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nexo/32/106384_2.png) [@nexo](https://meta.discourse.org/u/nexo)\
**Post date:** [2018年八月25日 00:31 UTC](https://meta.discourse.org/t/tracking-who-sent-private-messages/95607/2 "2018-08-25T00:31:52Z")

</div>

Nevermind, I found how:

> [@Who messaged the most?](https://meta.discourse.org/t/who-messaged-the-most/63963/3):
>
> Make sure you have the [Data Explorer](https://meta.discourse.org/t/data-explorer-plugin/32566) plugin installed, navigate to Admin → Plugins → Data Explorer, create a new query and paste in this SQL code: SELECT user\_id, count(\*) AS message\_count FROM topics WHERE archetype = 'private\_message' AND subtype = 'user\_to\_user' AND age(created\_at) \< interval '7 days' GROUP BY user\_id ORDER BY message\_count DESC This will show you all users that have messaged someone in the last 7 days, including the number of messages they have created. (Only new messages …

---

_[View the full topic](https://meta.discourse.org/t/tracking-who-sent-private-messages/95607)._
