5 Must have Logseq simple queries
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.
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?
What role do templates play in making property-based overviews practical day to day?
How does the AND/amp operator help build a “shopping list” style query?
Why is current-page scoping helpful for writing, and what breaks when zooming?
How can linking and tags power person-specific task reminders?
What’s the habit-tracking pattern using property presence and sorting?
Review Questions
- 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)?
- How would you design a query that returns only tasks that match two conditions at once (such as to-do plus a specific tag)?
- What risks come with using the current page macro in templates, and how does zooming affect query results?
Key Points
- 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
Pair hub pages with templates so new entries automatically collect consistent properties and immediately show up in the overview.
- 3
Filter tasks with tags using the AND/amp operator to build context-specific lists such as shopping routes or errands.
- 4
For writing workflows, combine tag filtering with current-page scoping so queries return only the relevant lines in the active context.
- 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
Keep templates organized by storing them in separate files and retrieving them dynamically via a template property.
- 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.