# Joining classification\_results table to other tables support request

**URL:** https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640
**Category:** Data & reporting
**Tags:** ai, sql-query, ai-sentiment
**Created:** [June 25, 2025, 12:59pm UTC](https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640 "2025-06-25T12:59:35Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Michael12](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michael12/32/507366_2.png) [@Michael12](https://meta.discourse.org/u/Michael12)
#### Post date: [June 26, 2025, 5:00am UTC](https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640/3 "2025-06-26T05:00:47Z")

</div>

Thanks, that helps a lot.

So just to check—if `target_type` is ‘post’, then I should join `classification_results.target_id` to `posts.id`, right?

And if the `target_type` is something else, like ‘comment’, then I’d join it to the `comments` table instead? Just want to make sure I’m joining to the right table based on the type.

---

_[View the full topic](https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640)._
