Query - what different between (todo) and (task: TODO)

I am trying to learn Query by creating Project Alpha and some tasks. Then I typed /q, select query, then TASK then TODO. After that I clicked the + sign, select Page reference and then Project Alpha. It ended up with this {{query (and (task TODO) [[Project Alpha]])}}

The query gives only one result, which is unexpected.

I then get help from Gemini, and found this {{query (and (todo) [[Project Alpha]])}}which I could not build by clicking the + sign to get the first todo.

However, this gives much better results, which is 7.

I am using Logseq app on MacBook M3, Tahoe 26.1

Could someone explain the difference between the two queries and advise how to get `{{query (and (todo)) …}} without having to remember the syntax and manually type it?

Apparently (todo) does nothing, so you simply get all blocks referencing page Project Alpha, no matter if they are TODO or not.

1 Like