# Query di Data Explorer per elencare gli argomenti con il "tempo di lettura stimato" più lungo?

**URL:** <https://meta.discourse.org/t/data-explorer-query-to-list-the-longest-estimated-read-time-topics/196761>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [11 Luglio 2021, 9:39am UTC](https://meta.discourse.org/t/data-explorer-query-to-list-the-longest-estimated-read-time-topics/196761 "2021-07-11T09:39:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![michebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michebs/32/190102_2.png) [@michebs](https://meta.discourse.org/u/michebs)\
**Post date:** [16 Agosto 2021, 3:28pm UTC](https://meta.discourse.org/t/data-explorer-query-to-list-the-longest-estimated-read-time-topics/196761/8 "2021-08-16T15:28:50Z")

</div>

Puoi utilizzare il tempo medio impiegato dagli utenti per leggere l’argomento.  
In tal caso, puoi semplicemente modificare la funzione **SUM** in **AVG** , che apparirebbe così:

```sql
SELECT
    topic_id,
    category_id,
    AVG(total_msecs_viewed) / 60000 AS estimated_minutes_read
FROM topic_users tu
JOIN topics t ON t.id = tu.topic_id
WHERE t.deleted_at IS NULL
AND t.archetype = 'regular'
GROUP BY tu.topic_id, category_id
ORDER BY estimated_minutes_read DESC
LIMIT 100

```

---

_[View the full topic](https://meta.discourse.org/t/data-explorer-query-to-list-the-longest-estimated-read-time-topics/196761)._
