# Dashboard Report - Topics with No Response

**URL:** <https://meta.discourse.org/t/dashboard-report-topics-with-no-response/294002>\
**Category:** Data & reporting\
**Tags:** sql-query, dashboard-reports, dashboard-sql\
**Created:** [February 2, 2024, 10:55pm UTC](https://meta.discourse.org/t/dashboard-report-topics-with-no-response/294002 "2024-02-02T22:55:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![SaraDev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saradev/32/335139_2.png) [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Post date:** [July 8, 2024, 10:06pm UTC](https://meta.discourse.org/t/dashboard-report-topics-with-no-response/294002/3 "2024-07-08T22:06:36Z")

</div>

> [@SStrong](#):
>
> Are you able to make a version that does not contain parameters?

Yes, here’s an updated version of the query that looks back 7 days from the current date without using parameters. 🙂

This version does not include any filtering by categories or subcategories.

```sql
WITH no_response_total AS (
  SELECT *
  FROM (
    SELECT 
      t.id, 
      t.created_at, 
      MIN(p.post_number) AS first_reply
    FROM 
      topics t
    LEFT JOIN 
      posts p 
    ON 
      p.topic_id = t.id 
      AND p.user_id != t.user_id 
      AND p.deleted_at IS NULL 
      AND p.post_type = 1
    WHERE 
      t.archetype <> 'private_message'
      AND t.deleted_at IS NULL
      AND (
        t.category_id = :category_id
        OR t.category_id IN (
          SELECT id FROM categories WHERE parent_category_id = :category_id
        )
      )
    GROUP BY 
      t.id
  ) tt
  WHERE 
    tt.first_reply IS NULL 
    OR tt.first_reply < 2
)

SELECT 
  DATE(nrt.created_at) AS date, 
  COUNT(nrt.id) AS topics_without_response
FROM 
  no_response_total nrt
WHERE 
  nrt.created_at::date BETWEEN CURRENT_DATE - INTERVAL '7 days' AND CURRENT_DATE
GROUP BY 
  date
ORDER BY 
  date ASC

```

If you wanted to adjust how far back the query looks, you would just need to change this line in the query:

```sql
nrt.created_at::date BETWEEN CURRENT_DATE - INTERVAL '7 days' AND 

```

---

_[View the full topic](https://meta.discourse.org/t/dashboard-report-topics-with-no-response/294002)._
