Aggregates inside datalog filters


#1

Can this post-query filter be done entirely in a peer-server?

(->> $
     (d/q '[:find (count ?fe) ?e :where
            [?e :request/type]
            [?e :link-query/find-element ?fe]])
     (filter #(< 1 (first %)))
     (map second))

#2

Using the Client API (i.e. with peer-server) you would need to get the result of the query from the client API call then do the filter and map in your application code.