Coffee Help
All topics

Help Finding notes

Query blocks

Mac

A code block named query lists notes under it as a table or a board of cards, picked by their tag, folder and front matter properties.

Two query blocks: a table sorted by due date, and a board grouped by status.
Two query blocks: a table sorted by due date, and a board grouped by status.

How to write a query

  1. Give your notes properties in their front matter, such as status: active and due: 2026-12-01.
  2. In any note, start a code block named query.
  3. Add the lines you need, one per line:
  4. from: takes a #tag (its nested tags too), a folder, or all.
  5. where: compares with =, !=, <, >, <=, >= and contains, joined with and.
  6. show: lists the fields to show, separated by commas.
  7. sort: names a field. Add desc to reverse it.
  8. limit: caps the list, 200 by default.
  9. view: is table or board, and group: picks the field a board groups by.
  10. Close the block. The list appears under it.

Example

In Markdown
```query
from: #project
where: status != done
show: title, status, due
sort: due
view: board
group: status
```

This shows every project note that isn't done as cards, in one column per status, soonest due first. With view: table you get a table with columns for title, status and due.

Good to know

  • Fields are front matter properties plus title, folder, tags and modified.
  • Numbers compare as numbers, and year-first dates like 2026-12-01 in date order.
  • Clicking a row or card opens the note.
  • Queries only read. You change a note's properties in the note itself.
  • Private notes are left out.
  • The file keeps only the query, so other editors and exports show a code block.

Not what you needed? Write to a person.