Get AI summaries of any video or article — Sign up free
5 Must have Logseq simple queries thumbnail

5 Must have Logseq simple queries

Tools on Tech·
5 min read

Based on Tools on Tech's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Use a “type” hub page plus a page-property query to generate instant overview tables for categories like books, projects, contexts, or authors.

Briefing

Logseq’s “simple queries” turn scattered notes into instant, filterable dashboards by leaning on page properties and a handful of query operators. The core idea behind the five must-have queries is consistent: store structured metadata on pages (like type, author, tags, links, or habit fields), then build views that automatically pull the right pages into tables or focused lists—without manually searching every time.

The first and most reusable pattern is a page-property overview. A single “type” page (for example, a Book type page) acts as a hub, while each item page links back to that hub through a property such as type. From there, a query can search for pages where a given property matches a specific type value, producing a clean table. To make this scalable, the workflow pairs the hub page with a template: the template defines the fields to collect (author, state, tags, series, and other book-related properties) and provides default structure. When a new item is added, inserting the template into a journal line and clicking the type link automatically routes the user to the correct overview.

The second query targets task triage using tags and the AND operator. A “shopping list” example shows how tasks can be filtered to only those marked as to-do, then further narrowed to a specific tag (like a Dutch supermarket tag). The result is a phone-friendly list that updates as new tasks are created—ideal for real-world workflows where you need a quick, context-specific view.

Third, filtered text views for writing and planning rely on tag intersection with the current page. By using the amp operator, the query can pull every line that contains both a specific tag (like “Boll”) and the current page context. For templates, the current page macro is recommended, but it comes with a caveat: zooming changes the current page variable, which can break the query.

Fourth, personal “people” overviews come from linking plus tags. When sections are marked with links to coworkers and tagged appropriately, a query can fetch all matching journal entries—then use copy-as to send quick reminders containing only the relevant tasks for that person. To avoid template sprawl, templates can be stored in separate files and retrieved dynamically via a template property, so the system stays organized even as the library grows.

Finally, habit tracking becomes a daily input plus a weekly summary. By adding an hours (or other measurable) property to a journal template and then querying for all journal pages that contain that property, the system generates an overview sorted by created time. That turns what would be a manual weekly bookkeeping job into a near-instant routine.

Taken together, these five queries show how Logseq’s property-based structure—type hubs, tag filters, current-page scoping, link-and-tag retrieval, template fetching, and property-driven habit summaries—can compress frequent tasks into seconds while keeping notes consistent and searchable across devices.

Cornell Notes

Logseq’s simple queries become powerful when notes are structured with page properties and consistent linking. The most important pattern uses a “type” hub page plus a page-property query to generate an overview table, paired with templates that define the fields to collect. Tag-based filters (including the AND/amp operator) create focused lists like shopping tasks, while current-page scoping supports writing workflows that pull only tagged lines from the active context. Linking plus tags enables person-specific task reminders, and storing templates in separate files keeps the system maintainable via a template property. Habit tracking is handled by querying journal pages that contain a measurable property (like hours) and sorting them for quick weekly review.

How does a “type hub” page-property query work in Logseq, and why is it useful?

A type hub is a single page representing a category (e.g., a Book overview). Item pages store a property (like type) that points back to that hub. A query then searches for pages where the property type matches the selected hub value, producing a table of matching items. The benefit is that clicking the type link takes you to the correct overview page, and the same structure can be reused for projects, contexts, authors, or any other category.

What role do templates play in making property-based overviews practical day to day?

Templates define the default fields and structure for new item pages under a given type. In the workflow described, the template is created from the parent/type page and configured so only the sub-data is inserted when adding a new item. When adding a new book, for example, a user inserts the book template into a journal line, then fills in properties like author, state, tags, and series—so the overview query immediately has consistent data to display.

How does the AND/amp operator help build a “shopping list” style query?

Tasks are first filtered to a broad set (e.g., all tasks marked as to-do) and then narrowed using a tag filter (e.g., tasks tagged for a specific supermarket). The amp operator expresses that both conditions must be true, so only tasks that satisfy the intersection appear. The result is a compact list that updates automatically as new tagged tasks are created.

Why is current-page scoping helpful for writing, and what breaks when zooming?

Current-page scoping lets a query pull only lines relevant to the active page—such as every line containing a tag (e.g., “Boll”) within the current context. For templates, the current page macro is recommended so the query adapts to where it’s inserted. However, zooming changes the current page variable; since the query depends on that value, zooming can cause the query to stop matching the intended content.

How can linking and tags power person-specific task reminders?

Sections can be marked with links to coworkers and also tagged. A query can then fetch journal pages that contain both the link to the current person and the relevant tag, including entries stored in the journal. Using copy-as, the system can generate a quick reminder containing only that person’s tasks, rather than requiring manual filtering.

What’s the habit-tracking pattern using property presence and sorting?

Daily journal entries include a measurable property (like hours worked). A query searches for journal pages where that property exists (not for a specific value), then sorts by created-at time. This produces an instant overview that turns weekly time scheduling into a quick, repeatable task—essentially a 10-second summary once the daily inputs are filled.

Review Questions

  1. What property and linking scheme would you use to create a reusable “type hub” overview for a category you track (e.g., authors or projects)?
  2. How would you design a query that returns only tasks that match two conditions at once (such as to-do plus a specific tag)?
  3. What risks come with using the current page macro in templates, and how does zooming affect query results?

Key Points

  1. 1

    Use a “type” hub page plus a page-property query to generate instant overview tables for categories like books, projects, contexts, or authors.

  2. 2

    Pair hub pages with templates so new entries automatically collect consistent properties and immediately show up in the overview.

  3. 3

    Filter tasks with tags using the AND/amp operator to build context-specific lists such as shopping routes or errands.

  4. 4

    For writing workflows, combine tag filtering with current-page scoping so queries return only the relevant lines in the active context.

  5. 5

    Create person-specific reminders by querying for pages that contain both a link to the person and the right tag, then use copy-as to extract the task list.

  6. 6

    Keep templates organized by storing them in separate files and retrieving them dynamically via a template property.

  7. 7

    Track habits by adding a measurable property to journal entries and querying for pages where that property exists, then sorting by created-at for fast weekly review.

Highlights

A single “type” property can power reusable overviews: item pages link back to a hub page, and a property query turns that into a table automatically.
The amp operator enables intersection filters—perfect for lists like “to-do tasks tagged for this supermarket.”
Current-page macros make template-based filtered views work, but zooming changes the current page variable and can break the query.
Templates don’t have to live in one place: a template property can fetch the right template from a separate file.
Habit tracking becomes a quick summary by querying journal pages that contain a property (like hours) and sorting by created-at.

Topics