Does datascript have a built-in aggregate function, like sample or distinct but returning the whole collection? I could not find it in https://docs.datomic.com/cloud/query/query-data-reference.html#aggregates
Looks like sample and distinct should exist: https://github.com/tonsky/datascript/blob/master/src/datascript/built_ins.cljc#L175-L187