Liking cljdoc? Tell your friends :D

sum

The :sum aggregate function, sums over numeric columns in a group.

Takes an expression as an argument.

For example, lets total across all the orders.

;; QUERY 
[[:from :Order] 
 [:agg [] [:total [rel/sum :total]]]
 
;; STATE 
{:Order #{{:total 10.0M}, {:total 15.30M}}}

;; RESULTS
({:total 25.30M})

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close