Creating Achievements Query

I’ve been working on setting up a template for tracking daily achievements, but I’m struggling with creating the necessary queries. While I can manage the template part, I’m not quite sure how to implement the queries.

Here’s what I’m aiming for:

Simple Daily Achievements List:

    I’d like to create a straightforward list of achievements for each day. For example:

    # Achievements
    * Achievement 1
    * Achievement 2

Separate Achievements Page:
    On a separate page named [[Achievements]], I want to generate a table with two columns:
        Column 1: Achievement Name
        Column 2: Date of Achievement

This table should automatically populate based on the achievements listed in the daily notes.

If anyone could provide guidance or examples for achieving this, I’d greatly appreciate it! Thank you in advance for your help. :blush:

Welcome.

  • If you:
    • turn the title into a tag
    • make the achievements direct children of it
  • like this:
    image
  • then can use a query like this one:
    #+BEGIN_QUERY
    {
     :query [:find (pull ?block [* ])
     :where
       [?ref :block/name "achievements"]
       [?parent :block/refs ?ref]
       [?block :block/parent ?parent]
     ]
    }
    #+END_QUERY
    
  • and switch to table view from the top-right
1 Like