3.2 KiB
3.2 KiB
title, category, date, tags
| title | category | date | tags | ||||
|---|---|---|---|---|---|---|---|
| Dataview Query Examples | Reference | 2026-02-23 |
|
Dataview Query Examples
Plugin: Obsidian Dataview
Your Vault Location: C:\Users\admin\Documents\Corey
📊 Summary Statistics
All Files in Vault
TABLE file.mtime AS "Modified", file.size AS "Size"
FROM ""
SORT file.mtime DESC
LIMIT 20
Files by Category
TABLE rows.file.name
FROM ""
WHERE category
GROUP BY category
🏠 Home Assistant Queries
Show Home Assistant Notes
TABLE status, total_automations AS "Total", active_count AS "Active", unavailable_count AS "Broken"
FROM "Home Assistant"
SORT file.name
Recent HA Updates
LIST
FROM "Home Assistant"
WHERE date_generated
SORT date_generated DESC
📁 Projects Dashboard
Active Projects Only
LIST
FROM "Projects"
WHERE contains(file.content, "Status: Active")
SORT file.name
All Projects with Status
TABLE status, type, last_updated
FROM "Projects"
WHERE status
SORT status DESC, file.name
📝 Research Summaries
Recent Summaries
TABLE date, source_url
FROM "Summaries"
WHERE date
SORT date DESC
LIMIT 10
Summaries by Tag
TABLE date, source_url
FROM #security OR #ai OR #infrastructure
WHERE date
SORT date DESC
By Source Type
TABLE date, type, tags
FROM "Summaries"
WHERE type
SORT type, date DESC
🤖 OpenClaw Configuration
OpenClaw Notes
TABLE category, status, date
FROM "OpenClaw"
SORT date DESC
📅 Daily Notes (if you create them)
Daily Notes Calendar
CALENDAR date
FROM "memory"
WHERE date
🔍 Search Examples
Find Notes Without Tags
LIST file.name
FROM ""
WHERE !file.tags
SORT file.name
Recently Modified Files
TABLE file.mtime AS "Modified"
FROM ""
WHERE file.mtime > date(today) - dur(7 days)
SORT file.mtime DESC
Notes by Category
TABLE category, status, date
FROM ""
WHERE category
SORT category, file.name
🛠️ Custom Queries
Broken HA Automations (needs attention)
LIST
FROM "Home Assistant"
WHERE unavailable_count > 0
Active Configurations
TABLE category, date, config_file
FROM ""
WHERE status = "active"
SORT category
Research by Date Range
TABLE date, type, source
FROM "Summaries"
WHERE date > date(2026-02-01) AND date < date(2026-03-01)
SORT date DESC
🎯 Quick Reference
| Query Type | Syntax |
|---|---|
| List | LIST FROM "folder" WHERE condition |
| Table | TABLE col1, col2 FROM "folder" |
| Sort | SORT column ASC/DESC |
| Limit | LIMIT number |
| Where | WHERE field = "value" |
| Group | GROUP BY field |
| Tags | FROM #tag1 OR #tag2 |
📝 Adding Frontmatter to New Notes
Use this template:
---
title: Your Note Title
category: Category Name
status: active/inactive/completed
date: YYYY-MM-DD
tags: [tag1, tag2, tag3]
---
Create your own queries by copying these and modifying!