I recently learned that one can insert the Simple Query inside an Advanced Query like so:
;; simple query
{{query (and (property due-date <%today%>) [[Reminder]] ) }}
;; advanced query
#+BEGIN_QUERY
{:title "Reminders for today"
:query (and (property due-date <%today%>) [[Reminder]] )
:collapsed? false}
#+END_QUERY
Is there any documentation as how far this embedding of simple queries in advanced queries can go?
For example the following gives an “Invalid query” error:
#+BEGIN_QUERY
{:title "Reminders for today"
:query (and [[Reminder]] (between <%yesterday%> -7d) )
:collapsed? false}
#+END_QUERY
so (between <%yesterday%> -7d)
is off-limits for Simple Queries inside Advanced Queries syntax while it works in simple queries (Live queries):
{{query (and [[Reminder]] (between <%yesterday%> -7d) ) }}