Can the result of query function be re-used?

My use case is like this:

  • I want to use logseq to track task effort
  • I create a page for each task and log the effort in the journal using properties. Example:
#[[task effort]]
task:: [[some task]]
effort:: <some effort>
  • I can then create a query for all the effort block so that I have a table of each day’s effort. After that, I can use query function to calculate the total effort for the task.
  • So far so good. But now I want to have a table listing all tasks and their total efforts, meaning I have to re-use the result of query function, and I can’t find a way to do that.

My question: whether the thing I want to do is possible? Or is there any better workflow for my use case?

  • For a single query: a Query function
    • You may be able to merge a few queries into one.
  • For anything more: custom code
1 Like

Can you give a hint for where can I start? Is this possible with advance query, macro or a plugin?

Logseq provides some basic API that:

  • can execute both:
    • simple queries
    • advanced queries
  • is used both by: