Simple query syntax for references and AND

I’ve created a tag #appreciation and would like to query recent blocks with that tag on its page. On the [[appreciation]] appreciation page I made a {{query and #appreciation (between -2w today)}} but it seems to be returning many more results than the 1 line i have tagged so far.

How do i query only the linked references on the page? Or am i messing something up with the indentation here?

1 Like

Well i think i’ve found the answer to my question. I needed to wrap the and operator and its list args in parentheses:

# bad
{{query and [[appreciation]] (between -2w today)}}

{{query (and [[appreciation]] (between -2w today))}}

However, I don’t understand what the bad version above is querying. On whatever page i write the query, I get the expected results for just query [[appreciation]] but I get about 25 more for query and [[appreciation]].

Edit 2: well the second issue was virtually identical to just writing {{query and}} with no args passed to it. So i guess and with no criteria matches almost, but not, everything?

I’ve also learned that query (and #tag (between -1w today)) does not work - only [[tag]] does.