# 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:** 16

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [27 Novembre 2021, 10:49am UTC](https://meta.discourse.org/t/data-explorer-query-to-list-the-longest-estimated-read-time-topics/196761/16 "2021-11-27T10:49:05Z")

</div>

Ci ho provato di nuovo. 🙂 Non sono sicuro al 100% di questo, dato che non ho un campione abbastanza grande per testarlo, ma ha raccolto i miei argomenti di prova. 👍

```plaintext
-- [params]
-- integer :limit = 10

WITH read_time AS (
SELECT t.id as topic_id,
(t.word_count)/500+1 as word_count_time,
(t.posts_count*4)/60+1 as post_count_time
FROM topics t
WHERE t.word_count IS NOT NULL
AND t.archetype = 'regular'
AND t.deleted_at IS NULL
)

SELECT topic_id, CONCAT (CASE WHEN word_count_time > post_count_time THEN word_count_time ELSE post_count_time END, ' min') AS estimated_reading_time
FROM read_time
ORDER BY estimated_reading_time DESC
LIMIT :limit

```

---

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