Back

aggregate-by-keys (clj)

(source)

function

(aggregate-by-keys connectable table aggregate key-map) (aggregate-by-keys connectable table aggregate key-map opts)
A wrapper over `find-by-keys` that additionally takes an aggregate SQL expression (a string), and returns just a single result: the value of that of that aggregate for the matching rows. Accepts all the same options as `find-by-keys` except `:columns` since that is used internally by this wrapper to pass the aggregate expression in.

Examples