# Comment voir le lien exact des sujets les plus référencés

**URL:** <https://meta.discourse.org/t/how-to-see-exact-link-of-top-referred-topics/275250>\
**Category:** Data & reporting\
**Tags:** sql-query, dashboard-reports\
**Created:** [Août 15, 2023, 2:53 UTC](https://meta.discourse.org/t/how-to-see-exact-link-of-top-referred-topics/275250 "2023-08-15T14:53:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [Septembre 27, 2023, 8:31 UTC](https://meta.discourse.org/t/how-to-see-exact-link-of-top-referred-topics/275250/6 "2023-09-27T20:31:30Z")

</div>

Est-ce que quelque chose comme ceci conviendrait ?

```sql
--[params]
-- date :start_date
-- date :end_date

SELECT
	'https://meta.discourse.org/' || 't/' || t.slug || '/' || t.id || '/' || p.post_number AS post_url,
	COUNT(*) AS external_click_count
FROM incoming_links il
  INNER JOIN posts p ON p.id = il.post_id
  INNER JOIN topics t ON t.id = p.topic_id
WHERE t.archetype = 'regular'
  AND il.created_at::date BETWEEN :start_date AND :end_date
GROUP BY p.id, t.id
ORDER BY external_click_count DESC

```

(Bien que vous puissiez remplacer le lien de votre propre site par `https://meta.discourse.org` 🙂 )

---

_[View the full topic](https://meta.discourse.org/t/how-to-see-exact-link-of-top-referred-topics/275250)._
