Query shows tasks outside the intended date filter


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
      [?h :block/marker ?m]
      [(contains? #{"LATER" "TODO"} ?m)]
      (or-join [?h ?d]
        [?h :block/ref-pages ?p]
        [?p :block/journal? true]
        [?p :block/journal-day ?d])
       [?h :block/scheduled ?d]
       [?h :block/deadline ?d])
       [(< ?d ?next)]
       [(> ?d ?today)])]]
  :inputs [:3d-after :today] 
  :table-view? false
  :breadcrumb-show? false
  :collapsed? true}


From what I see, the following and-clause :

       [(< ?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