# SQL Query API

With Spice SQL Query, you can query blockchain and contract data using SQL and fetch your results over [HTTP](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/api/sql-query-api/http-api) or [Apache Arrow Flight](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/api/sql-query-api/apache-arrow-flight-api).

See the [SQL Query Tables](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/reference/sql-query-tables) for table definitions and [SQL Reference](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/reference/sql-reference) for documentation on supported SQL commands (ANSI-SQL).

### Example SQL Queries

* [Ethereum (EVM) Queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-ethereum-sql-queries)
* [Ethereum Beacon Queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-bitcoin-queries)
* [Decentralized-Exchange (DEX) Queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-dex-queries)
* [Bitcoin Queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-bitcoin-queries)
* [Cross-Chain Queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-cross-chain-queries)
