# Federated SQL Query

Join data from databases, warehouses, and data lakes in one SQL query, and run it in the Playground, over Arrow Flight, or over HTTP.

![A federation and acceleration diagram. Data and AI applications send queries to Spice.ai Federation. It queries three sources: Snowflake, an object storage bucket, and PostgreSQL. An Acceleration arrow points to the data accelerators: Apache Arrow, DuckDB, SQLite, PostgreSQL, and Cayenne.](https://spice.ai/website-assets/docs/spice-ai-federation-and-acceleration.png)

Spice supports federated queries, enabling you to join and combine data from multiple sources, including databases (PostgreSQL, MySQL), data warehouses (Databricks, Snowflake, BigQuery), and data lakes (S3, MinIO). For a full list of supported sources, see [Data Connectors](https://docs.spiceai.org/components/data-connectors).

## SQL Query

### Playground SQL Explorer

The Playground SQL Explorer is the fastest way to get started with federated queries, debugging queries, and iterating quickly. The SQL Query Editor can be accessed by clicking on the **SQL Explorer** tab after selecting **Playground** in the project navigation bar.

![The SQL Query page in the Playground holds a query for the 10 longest trips in spice.samples.taxi\_trips with more than 3 passengers. The Results pane reads 'Showing 10 of 10 total results in 0.109s'. A Catalog panel on the right lists the runtime, samples, and tpch schemas under spice.](https://spice.ai/website-assets/docs/cleanshot-2026-01-09-at-00-43-27-2x.png)

The Playground SQL Query Editor.

See [sql-query-editor.md](https://spice.ai/docs/cloud/portal/playground/sql-query-editor "mention") for further documentation on using the SQL Query Editor.

### Apache Arrow Flight API

For production applications, leveraging the high-performance [Apache Arrow Flight](https://spice.ai/docs/cloud/api/sql-query/apache-arrow-flight-api) endpoint is recommended. The Spice SDKs always query using Arrow Flight.

See [apache-arrow-flight-api.md](https://spice.ai/docs/cloud/api/sql-query/apache-arrow-flight-api "mention") for further documentation on using Apache Arrow Flight APIs.

### HTTP API

SQL Query is also accessible via a standard HTTP API.

See [http-api.md](https://spice.ai/docs/cloud/api/sql-query/http-api "mention") for further documentation on using the HTTP SQL API.
