# DataView [[Obsidian Plugins]] From [[ChatGPT]], pretty good overview: > Dataview supports various types of queries to help you extract, filter, and display information from your Markdown notes in Obsidian. Some common query types include: > > 1. **List queries**: These queries return a list of pages or files based on specified criteria. You can filter the results using conditions such as tags, front-matter properties, and inline fields. > > 2. **Table queries**: Table queries create a table view from the queried data, displaying specific properties in columns. You can customize the displayed columns and even use expressions to calculate values. > > 3. **Task queries**: Task queries allow you to filter and display tasks (incomplete or completed) from your notes based on specific criteria. > > 4. **Grouping and sorting**: Dataview supports grouping and sorting results in both list and table views. You can group by specific properties or fields and sort the results based on your requirements. > > 5. **Aggregation**: Dataview can perform aggregations, such as summing, averaging, or counting the values of specific properties or fields. > > 6. **Mathematical and logical expressions**: The query language supports various mathematical and logical expressions, allowing you to perform calculations and comparisons within your queries. > > 7. **String manipulation**: Dataview supports string manipulation functions, enabling you to modify the output of your queries or filter the results based on text patterns. --- Here are a few example queries using the Dataview plugin in Obsidian. These examples assume you have notes with YAML front-matter or inline fields. 1. **List query**: List all notes tagged with `#project`: ``` list from #project ``` 2. **Table query**: Display a table with notes containing a "due_date" front-matter property, showing their titles and due dates: ``` table file.title as "Title", due_date as "Due Date" from "path/to/your/notes/folder" where due_date sort due_date asc ``` 3. **Task query**: Show incomplete tasks from notes tagged with `#todo`: ``` task from #todo where !task.completed ``` 4. **Grouping and sorting**: Display a list of books grouped by their "genre" front-matter property, sorted by their "rating" property in descending order: ``` list from "path/to/your/books/folder" group by genre sort rating desc ``` 5. **Aggregation**: Calculate the average rating of books with a "rating" front-matter property: ``` number(avg(rating)) from "path/to/your/books/folder" where rating ``` ## External Links - [GitHub - blacksmithgu/obsidian-dataview: A high-performance data index and query language over Markdown files, for https://obsidian.md/.](https://github.com/blacksmithgu/obsidian-dataview) - [Dataview](https://blacksmithgu.github.io/obsidian-dataview/)