Who messaged the most?

Make sure you have the Data Explorer plugin installed, navigate to AdminPluginsData 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 count, replies don’t.)

To see the messages, simply click their username and go to MessagesSent :slight_smile:

9 Likes