That’s fine
It’s both easy to do.
You can see the date range used behind inputs:
#+BEGIN_QUERY
{:title [:h3 "Courses this period"]
:inputs [20230401 20240331]
:query [:find (pull ?p [*])
:in $ ?start ?end
:where
(page-property ?p :type "Course") ; case sensitive
[?b :block/page ?p]
[?b :block/refs ?j]
[?j :block/original-name ?journal]
[?j :block/journal-day ?d]
[(<= ?start ?d ?end)]
; check that the reference we take is from the property we want
[?b :block/properties ?prop]
[(get ?prop :date-completed) ?end]
[(contains? ?end ?journal)]
]
}
#+END_QUERY
Example result