# Search and export messages

**URL:** <https://meta.discourse.org/t/search-and-export-messages/256714>\
**Category:** Support\
**Created:** [March 1, 2023, 7:36pm UTC](https://meta.discourse.org/t/search-and-export-messages/256714 "2023-03-01T19:36:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [March 3, 2023, 11:16am UTC](https://meta.discourse.org/t/search-and-export-messages/256714/4 "2023-03-03T11:16:09Z")

</div>

> [@MentalNomad](#):
>
> Presumably this will work if we want to have someone review all of A’s messages, but it won’t necessarily be clear which messages originally included B, since B has left.
> 
> I think we’ll need to do some SQL work to identify the right sets of messages.

I understand the issue and yes, some SQL work will do the job.  
Looking for `action_code = 'user_left'` in the `posts` table contains the corresponding `topic_id`. [Data explorer](https://meta.discourse.org/t/32566?silent=true) is convenient because it automatically creates links to profiles and topics or posts in the results:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/b/4/1b48326f70a071b9388ff5276a6b696f5b8128f5.png)

---

_[View the full topic](https://meta.discourse.org/t/search-and-export-messages/256714)._
