Query undated TODOs

Is there a way to query or advanced query TODO with no date marker? (Undated TODOs)

Thank you in advance.

2 Likes

Here you are (quick & dirty):

				#+BEGIN_QUERY
			{:title "⚠️NO DATE"
			  :query [:find (pull ?b [*])
					  :in $ ?start 
					  :where
						[?b :block/marker ?marker] [(= "TODO" ?marker)]	  
						(not [?b :block/scheduled])
						(not [?b :block/deadline]) 
					]
			  :inputs [:today]
			:result-transform (fn [result]
								(->> result
									(map (fn [r] (dissoc r :block/children)))
									  (sort-by (fn [r] (get r :block/priority "Z")))
									
								)
							)
			  :collapsed? false}
			#+END_QUERY