The answer is in the Advanced Queries section of the Datomic tutorial
Use offer :in
(d/q '[:find ?n ?x :in $ ?x :where [?n :likes ?x]]
[['ethel :likes "sushi"]['fred :likes "pizza"]] "sushi")
=> #<HashSet [[ethel "sushi"]]>
:in $ ?xis a sentence of the parameter, and the final one is "sushi"tied to?x
source
share