Query shows tasks outside the intended date filter

Hi,

the query below still shows tasks with dates > 3 days and also today. I want to have only those after today and < = 3 days

{:title "đŸ“… NEXT 3 DAYS, NOT TODAY"
  :query [:find (pull ?h [*])
      :in $ ?next ?today
      :where
      [?h :block/marker ?m]
      [(contains? #{"LATER" "TODO"} ?m)]
      (or-join [?h ?d]
       (and
        [?h :block/ref-pages ?p]
        [?p :block/journal? true]
        [?p :block/journal-day ?d])
       [?h :block/scheduled ?d]
       [?h :block/deadline ?d])
      [(and
       [(< ?d ?next)]
       [(> ?d ?today)])]]
  :inputs [:3d-after :today] 
  :table-view? false
  :breadcrumb-show? false
  :collapsed? true}

@Siferiax

From what I see, the following and-clause :

[(and
       [(< ?d ?next)]
       [(> ?d ?today)])]

should not be inside square brackets [] . If that’s the case, could also remove and as well, because at the top level it is implied.

Seems like this is an old issue.

Hi @mentaloid
Thanks for your answer.
That it strange. I used the suggestion by @Siferiax but I guess somehow I ended up with the old query again. Might be a version control issue from my side.

I will check that one again and see if it works as expected.

Thanks again
David