The example is missing the result line. Should be like this:
:result-transform (fn [result] (sort-by
(juxt
(fn [h] (get h :block/priority))
(fn [r] (get-in r [:block/page :block/journal-day]))
)
result
))
(fn) Is a anonymous function. It takes parameters as in put and uses those in the function.
So the result transform has a (fn [result]) where result is the input. Basically it is your query result. The term used here is arbitrary.
So in its most basic form we can have a result transform of :result-transform (fn [result] result)
Then we can start to add functions to it. In the case the sort-by function. This has a syntax of (sort-by keyfn coll)
Or in simpler terms what you want to sort by and what you wish to sort.
In the example the what you wish to sort was missing, that is, the result.
For juxt it is simply multiple of those keyfn as the sort by. It’s short for juxtaposition.
Can find more on those functions in the clojure docs. Just be mindful that not everything stated there is available in Logseq. It’s a good place to start learning about what examples on this forum do/how they work. (At least in terms of result-transform)
https://clojuredocs.org/