# Viewing all the notes (not a graph of them) linked to this note?

**URL:** <https://org-roam.discourse.group/t/viewing-all-the-notes-not-a-graph-of-them-linked-to-this-note/126>\
**Category:** How To\
**Created:** [May 14, 2020, 1:14pm UTC](https://org-roam.discourse.group/t/viewing-all-the-notes-not-a-graph-of-them-linked-to-this-note/126 "2020-05-14T13:14:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [May 14, 2020, 1:58pm UTC](https://org-roam.discourse.group/t/viewing-all-the-notes-not-a-graph-of-them-linked-to-this-note/126/2 "2020-05-14T13:58:51Z")

</div>

A bit of understanding of the SQL DB will get you pretty far here. Say your topic A is file “[topic.org](http://topic.org)”, then you can run a query as follows (copied from [How to create a link to a org-roam search?](https://org-roam.discourse.group/t/how-to-create-a-link-to-a-org-roam-search/85/2)):

```auto
(org-roam-db-query 
  [:select [from] :from links :where (= to $s1)] (expand-file-name org-roam-directory "topic.org"))

```

That would return you the list of files related to the topic, and you can also then programatically generate a new Org file using the `#+INCLUDE` syntax for Org to export all those notes.

---

_[View the full topic](https://org-roam.discourse.group/t/viewing-all-the-notes-not-a-graph-of-them-linked-to-this-note/126)._
