An aggregate function that computes the average for all sampled values by some expr.
In the below example, we use avg
to compute the average-order-value (aov) over a group of orders.
;; QUERY
[[:from :Order]
[:agg [] [:aov [rel/avg :total]]]]
;; STATE
{:Order [{:total 10.0M}
{:total 25.0M}]}
;; RESULT
[{:aov 17.5M}]
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 |