Skip to content

min

The min aggregate function allows you to find the lowest value across a set of rows.

In this example, we take the minimum :id across the entire :Customer table.

;; QUERY
[[:from :Customer] 
 [:agg [] [:min-id [min :id]]]]

;; STATE 
{:Customer #{{:id 0}, {:id 1}, {:id 2}}}

;; RESULT
({:min-id 0})