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 builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close