Search for unscheduled tasks

Is it possible to search for tasks that are not scheduled?
I know there exists :block/scheduled, but I only understand how to use it, if the task IS scheduled. What is the value, if it’s not?

The following doesn’t seem to work:

#+BEGIN_QUERY
{:title "Inbox"
  :query [:find (pull ?h [*])
    :where
      [?h :block/scheduled ?d]
      [(= ?d "nil")]]}
#+END_QUERY

This works for me:

#+BEGIN_QUERY
{:query
 [:find (pull ?b [*])
:where
[?b :block/marker ?marker]
(not [?b :block/scheduled ?sch])
[(contains? #{"LATER" "TODO"} ?marker)]]
}
#+END_QUERY
1 Like