Obsidian Dataview — Queries Worth Keeping

Dataview turns your vault into something you can actually query. After months of tweaking, these are the queries I use constantly — not the ones I bookmarked and forgot.

The Ones I Actually Use

What did I work on recently?

TABLE file.ctime AS "Created"
WHERE file.ctime >= date(today) - dur(1 week)

This goes in my dashboard. Swap 1 week for 1 month when I want a broader view. Add FROM "folder" to scope it down.

All my unfinished tasks, grouped by note

TASK
WHERE !completed
GROUP BY file.link
SORT rows.file.ctime ASC

This is basically my task manager. I stopped using a separate todo app after building this.

Tasks due today (for daily notes)

TASK
WHERE due = this.file.day

Drop this in your daily note template. It pulls tasks whose due date matches the note’s date — so each day’s note automatically shows what’s due.

Everything tagged with something specific

LIST FROM #project
SORT file.mtime DESC

Replace #project with whatever tag you’re tracking.

Tasks Plugin Queries

If you use the Tasks plugin (separate from Dataview), it has its own syntax that’s cleaner for task-specific views:

not done
due before 2 days after the current date
hide due date
hide priority
hide created date
hide backlink
sort by due date

And a minimal daily view:

due on today
short mode
sort by priority
sort by tag

The Syntax in 30 Seconds

Four view types: TABLE, LIST, TASK, CALENDAR. Filter with FROM (folder) and WHERE (conditions). Sort with SORT. That’s 90% of what you need.

For deeper stuff: Dataview Beginner’s Guide and Dataview with Tasks.

See Also