Lattuce tutorial · Notes & Library
Note queries
Query Notes with Dataview-lite fences to build live lists, tables, tasks, and filtered research views.
Vault notes can embed live query fences (Dataview-lite). Use a fenced block:
Queries turn note properties into a repeatable index. Start with one narrow question—such as “which daily notes still have tasks?”—and add filters one at a time. A query reads note metadata; it does not create or edit notes.
```dataview
LIST
WHERE kind = daily
LIMIT 10
```
Languages dataview and query both work. Slash commands /query and /dataview insert a starter fence.
Directives
| Directive | Effect |
|---|---|
TABLE col1, col2 | Tabular results |
LIST | Bullet list of notes |
TASK | Checkbox lines from matching notes |
WHERE key = value | Property / tag / kind filters (AND supported) |
FROM #tag | Tag filter |
FROM kind = daily | Kind filter |
FROM folder = Projects or FROM [[Projects]] | Folder / namespace prefix |
BETWEEN 2026-01-01 2026-01-31 | Daily-note date range |
LIMIT n | Cap results (max 100) |
Build a query safely
- Insert a starter block with
/queryor/dataview. - Choose
LIST,TABLE, orTASKbased on the result you need. - Add one
FROMscope and oneWHEREcondition. - Add a date range or
LIMITbefore widening the query. - Preview the results, then give the block a nearby heading that explains its purpose.
Use stable properties such as kind, folder, and tags instead of relying on prose inside a note. If a result looks wrong, open the note and inspect its frontmatter or task syntax before changing the query.
Examples
Open tasks this month:
```dataview
TASK
FROM kind = daily
BETWEEN 2026-08-01 2026-08-31
LIMIT 50
```
Advanced Logseq Datalog (:find / :where) is intentionally out of scope. Use Notes filters and separate query blocks when you need a simpler, portable view.
Browse more in Notes & Library or return to all tutorials.