The max aggregate function allows you to find the highest value across a set of rows.
In this example, we take the maximum :id across the entire :Customer table.
;; QUERY
[[:from :Customer]
[:agg [] [:max-id [max :id]]]]
;; STATE
{:Customer #{{:id 0}, {:id 1}, {:id 2}}}
;; RESULT
({:max-id 2})
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |