## Description
Notes about using the [Obsidian Dataview Plugin - Docs](https://blacksmithgu.github.io/obsidian-dataview/) to better organize my Obsidian data. This plugin allows me to query Obsidian notes and frontmatter in:
- DQL (Dataview Query Language), similar to SQL
- JavaScript, as a functional query language
### Example Use Cases
- Track sleep by recording it in daily notes, and automatically create weekly tables.
- Found in [[Meta MOC]]
- Automatically collect links to books in your notes, sorted by rating.
- Automatically collect pages associated with today's date and show them in your daily note.
- Find pages with no tags for follow-up, or show pretty views of specifically-tagged pages.
- [x] Show pages with no tags in [[Mission Control]]
- Create dynamic views which show upcoming birthdays or events recorded in your notes.
## How to Use
First I need to [[Adding Metadata to Pages|index data]] before I can [[Querying Metadata|query]] it.
### Indexing Data
Dataview can read note metadata, including
- Tags
- Bullet points
- Tasks
- [Inline Fields](https://blacksmithgu.github.io/obsidian-dataview/annotation/add-metadata/#inline-fields)
- YAML frontmatter
#### YAML Frontmatter
Looks like
```yaml
---
author: "Edgar Allan Poe"
published: 1845
tags:
- poems
---
```
#### Inline Fields
```md
# The Raven
From [author:: Edgar Allan Poe], written in (published:: 1845)
Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
```
### Querying Data
Options include:
- Dataview Query Language
- Inline Queries
- JavaScript
#### Dataview Query Language
- Exactly one Query Type
- 0 or 1 *FROM* statements for a specific tag/folder/source
- 0 to many Data Commands to help filter or group data
##### Examples
###### List All Files in Vault
```md
\```dataview
LIST
\```
```
###### All Tagged Poems for Specific Author
```md
\```dataview
LIST
FROM #poems
WHERE author = "Edgar Allan Poe"
\```
```