Datomic uses a simple, declarative, logic-based query langage called Datalog. Like SQL, Datalog is a declarative query language, meaning you specify what you want to know, but not how to find it. A Datalog system includes a database of facts (your Datomic database) and a set of rules.
The Datomic Query Engine takes a partially specified set of facts or rules and finds all instances of the specification implied by the database and rules. The Excecuting Queries page describes the fundamentals of buiding a Datomic Query.