Sorting by priority with simple query

I have this simple query “{{query (and (todo todo doing) [[Momolingo]])}}” which gets all my TODOs for a project. I see there’s a “sort-by” for simple queries:

But don’t see how to make this sort by priority which seem to just be tags. BTW, anyway to have drag-and-drop functionality for prioritizing todos? Some kind of property could be added to the blocks that changes when their drag position is changed I suppose.


Was able to combine simple and advanced queries this way:

{:title "🔨 All todos with current pages tag"
 :query (and (todo TODO DOING) [[Momolingo]])
:result-transform (fn [result]
                                 (sort-by (fn [h]
                                                  (get h :block/priority "Z")) result))