# Is there a way to Search by Posts with No Staff replies on it

**URL:** https://meta.discourse.org/t/is-there-a-way-to-search-by-posts-with-no-staff-replies-on-it/126004
**Category:** Data & reporting
**Tags:** sql-query
**Created:** [16 augustus 2019 om 17:50 UTC](https://meta.discourse.org/t/is-there-a-way-to-search-by-posts-with-no-staff-replies-on-it/126004 "2019-08-16T17:50:33Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [17 augustus 2019 om 00:16 UTC](https://meta.discourse.org/t/is-there-a-way-to-search-by-posts-with-no-staff-replies-on-it/126004/7 "2019-08-17T00:16:41Z")

</div>

This should give you what you what you are looking for once you get the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin installed.

> [@Return all non-PM topics that have not received a staff reply](https://meta.discourse.org/t/return-all-non-pm-topics-that-have-not-received-a-staff-reply/275165/1):
>
> ```sql
> SELECT t.id topic_id, category_id
> FROM topics t
> WHERE t.deleted_at IS NULL
> AND t.category_id IS NOT NULL
> AND t.id NOT IN (
> SELECT p.topic_id
> FROM posts p 
> JOIN users u ON p.user_id = u.id
> WHERE u.admin = 't' OR u.moderator = 't'
> AND p.post_number > 1
> )
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-search-by-posts-with-no-staff-replies-on-it/126004)._
