# Specifying a Query into Axiom

Developers send queries to Axiom's on-chain contract requesting a ZK proof for a specific set of data they would like to prove. Queries can be built in [AxiomREPL](https://repl-preview.axiom.xyz) or with the Axiom SDK. See [axiomrepl](https://intrinsic-1.gitbook.io/axiomv2-sdk/developers/axiomrepl "mention") and [quickstart](https://intrinsic-1.gitbook.io/axiomv2-sdk/introduction/quickstart "mention") for more details, or [autonomous-airdrop](https://intrinsic-1.gitbook.io/axiomv2-sdk/examples/autonomous-airdrop "mention") for a concrete example.  Axiom V2 supports two types of queries:

* **Compute Query:** This can be created through the AxiomREPL Javascript interface and supports general computations over the history of Ethereum.
* **Data Query**: This can be created through the Axiom SDK and supports reading data only from the entire history of Ethereum.&#x20;

Most developers will want to use the Compute Query; the Data Query is available for power users.  Learn more about the two types of queries below.

### Compute Query

Compute Queries are built in [AxiomREPL](https://repl.axiom.xyz/), which allows developers to write custom ZK circuits in Javascript which make reference to historic on-chain data on Ethereum. AxiomREPL exports a client-side ZK prover for each compute query which allows users of on-chain applications to generate client-side proofs and send queries to Axiom.

<figure><img src="https://2736512689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypbpUjOqJ3jQY4bOzbnl%2Fuploads%2FNmH6Sd3n3Hh6JqD4JEX3%2FGeneral%20Axiom%20Flow%20-%20Compute%20Query%20(1).png?alt=media&#x26;token=bbb0cee8-9ee6-4a64-9d10-2eed3b1f5012" alt=""><figcaption><p>Flow diagram of how a Compute Query (using AxiomREPL) may fit into a developer's app.</p></figcaption></figure>

Additional information can be found at [axiomrepl](https://intrinsic-1.gitbook.io/axiomv2-sdk/developers/axiomrepl "mention").

### Data Query

In order to construct a Data Query, a developer can specify different **subqueries** for the types of data that they want.  Learn more about the different types of subqueries at [data-subqueries](https://intrinsic-1.gitbook.io/axiomv2-sdk/sdk-and-repl-reference/axiom-sdk-reference/data-subqueries "mention").&#x20;

Developers will need to do additional validation within their smart contracts to ensure aspects of query integrity before passing the data to Axiom.

<figure><img src="https://2736512689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypbpUjOqJ3jQY4bOzbnl%2Fuploads%2F2NkH8DjAztDkC73X9cPA%2FGeneral%20Axiom%20Flow%20-%20Data%20Query%20(3).png?alt=media&#x26;token=5a1153b9-9e13-40b6-aa91-cf2666642cb2" alt=""><figcaption><p>Flow diagram of how a Data Query may fit into a developer's app.</p></figcaption></figure>

## Callback

A Query also includes a callback, which allows users to specify a smart contract that will receive the data after the proof is generated. For more information, see [handling-axiom-callbacks](https://intrinsic-1.gitbook.io/axiomv2-sdk/developers/handling-axiom-callbacks "mention").&#x20;
