Query for pages with property value that contains specific word

This may be helped by contains?

Here is a sample search I use for TODOs. TODOs are just blocks that start with a capitalised TODO/DOING/NOW/LATER.

#+BEGIN_QUERY
{
	:query [
		:find (pull ?b [*]) 
		:where 
			[?b :block/uuid] 
			[?b :block/marker ?marker] 
			[(contains? #{"TODO" "DOING" "LATER" "NOW"} ?marker)] 
	]
}
#+END_QUERY

A tip I learnt recently for creating advanced queries is by looking at the console output for a page. It will show the advanced query of a simple query. “Ctrl+Shift+i” on desktop. Advanced Query: Blocks excluding certain tag - Questions & Help - Logseq

4 Likes