Join different data sources in one query.

Match orders in one database with invoices in another. Federated Queries combine them in one SQL statement and return one result, without a separate export-and-load pipeline.

Included on every plan, including Free. Your plan sets the source and row limits.

Two stacked-disc database symbols, one slate and one green, sitting side by side on a park bench with one sheet laid across both

Different sources.
The same order number.

Follow one unpaid-orders query. Select an order number to trace its customer and invoice through the join. Sample data.

Illustrative join

Orders

SQL Server · Head office
erp
Illustrative orders table. Select an order number to trace a match.
OrderCustomerPlaced
Halden Logistics9 Oct 2026
Castellan Foods7 Oct 2026
Northgate Clinics3 Oct 2026
Lakeside Works2 Oct 2026
Customer names live here.

Invoices

PostgreSQL · Cloud account
billing
Illustrative billing table. Select an order number to trace a match.
InvoiceOrderAmountStatus
INV-2048112,480.00Open
INV-2047928,900.00Overdue
INV-2047517,320.80Overdue
INV-204702,150.00Paid
Invoice numbers, balances and status live here.

The highlighted order number appears in both tables. The connection names erp and billing tell the query where each table lives.

Tell SQL how they belong together.

ON i.order_no = o.order_no matches each invoice to its order. The customer comes from orders; the invoice fields come from billing.

The WHERE clause leaves paid invoices out. A match can exist in the sources and still be excluded from the answer.

Tracing ORD-7731: Halden Logistics and INV-20481 meet on the same order number.

One saved queryUnpaid orders
SELECT o.customer, i.invoice,
       i.amount, i.status
FROM erp.sales.orders o
JOIN billing.public.invoices i
  ON i.order_no = o.order_no
WHERE i.status <> 'Paid'
The first part of each table name is your connection name. Query Streams completes the cross-source join.

One result. Both sides of the story.

Customer names from orders, invoice details from billing. Already matched.

3 rows · 58,700.80 total
Joined unpaid invoices. Customer names come from SQL Server; invoice, amount and status come from PostgreSQL.
SQL Servererp · ordersPostgreSQLbilling · invoices
CustomerInvoiceAmountStatus
Halden LogisticsINV-2048112,480.00Open
Castellan FoodsINV-2047928,900.00Overdue
Northgate ClinicsINV-2047517,320.80Overdue

ORD-7731 brings Halden Logistics and invoice INV-20481 into the same result row.

Why isn’t the paid invoice here?

ORD-7708 matches INV-20470 in the source tables. Its status is Paid, so WHERE i.status <> 'Paid' excludes it. It contributes nothing to the three-row total.

All connectors. One useful result.

Federated Queries work with every Query Streams connector. Join data from databases, files, logs and API-connected services in one SQL statement.

DatabasesFiles and logsAPIs and SaaS
Works withMySQLWorks withOracleWorks withSnowflake
Rotating logos show supported sources. The worked example above uses SQL Server and PostgreSQL.
Database example: connection, schema and table
billing.public.invoices
billingthe connection, named by you when you set it uppublicthe schema inside that databaseinvoicesthe table

Join data from services such as Stripe, HubSpot or Shopify alongside your other sources through the API Connector. Source settings determine whether a query reads a synced copy or refreshes supported API data before SQL runs. See the API Connector

Two small cut-away rooms side by side, a database in each, and between them one white sheet on a low plinth; one line runs from each database to the sheet

Let each database do its share.

Review the plan to see what each source will return and where the join will be completed. The Network Agent provides the same outbound connection used for other queries.

  • Query Streams runs the join for youWhere supported, filtering, column selection and grouping happen at the source. Query Streams finishes the cross-database join and returns the combined rows.
  • Through your own agent, outbound onlyEach piece travels through the Network Agent inside that network over one encrypted outbound connection. No inbound port, no VPN, and the database logins never leave.
  • Read-only, every pieceOnly SELECT, WITH and EXPLAIN are allowed. A federated query cannot write to any of your databases.
  • A ceiling per sourcePer-source row limits bound how much data one query can read for a join. Review the plan and narrow the source filters when you need less data.
  • It refuses rather than guessesDatabases can treat numbers and text differently. Unsupported expressions are reported so you can adjust the query rather than rely on a silently changed result.
  • Counted like any other queryFederated queries use your plan’s monthly data allowance. Source and result-row limits also apply.
What each database was askedShown in the Query Builder’s Plan tab before you run it
erpSQL ServerReturns order number and customer from SQL Server, using its native SQL dialect.
billingPostgreSQLFilters out paid invoices in PostgreSQL and returns the invoice fields and matching order number.
Query Streamsthe joinMatches the two by order number and returns one table. ready

Cross-source queries, including on Free.

Federated Queries are included on every plan. Your plan sets how many sources a query can join, how much each source can return, and how many combined rows you receive.

Sources per query

Join two connections on Free. Higher plans support more sources in one query.

Rows from each source

Each source has a row ceiling before the join. Filtering at the source keeps that input focused.

Rows in the result

The combined result has its own limit. A join can read more source rows than it returns.

Compare source and row limits on the pricing page

Save the join. Reuse the result.

Save a federated query in the Query Builder, then run it from the tools you already use. The caller receives one combined result.

In a spreadsheet

Run a saved query in Excel or Google Sheets. Results arrive as ordinary cells, ready for formulas, charts and pivots. Refresh when you need current figures.

The combined rows arrive as one result.
Illustrative examples
Excel and Google Sheets add-ins

Through a REST API

Give your apps, vendors or factories targeted query results. Their software receives the allowed data; your SQL and source credentials stay private.

The caller receives one combined cross-database result.
Illustrative examples
Database REST API

With your AI

Run saved queries through your own AI via MCP, or work with Nova, the built-in analyst, on Business and Enterprise plans.

Your AI tools can list and run saved federated queries.
Illustrative examples
MCP server for your AI tools

Write and review the query

Use the Query Builder to write SQL, inspect results and review the Plan tab. Save the definition once and reuse its results.

Nova can help draft it on Business and Enterprise plans.
Illustrative examples
Query Builder

Questions people ask about federated queries

What is a federated query?

One SQL statement that reads from two or more connections and returns a combined result. Every Query Streams connector supports federation, including database, file, log and API connectors. Name the connections in your query and join the data they provide.

Do my databases need to be in the same place?

No. They can be in different offices, different cloud accounts or different countries. Each location runs a Network Agent that reaches Query Streams by dialling out, so there is nothing to open on the firewall and no VPN to build. Several databases on one server can share one agent.

Do I need a data warehouse or an ETL pipeline as well?

You can join connected sources without building a separate warehouse or export-and-load pipeline for the result. Database sources are queried when you run it; connectors that sync data contribute their latest synced data. A warehouse can still be useful for large historical workloads.

Is it slower than querying one database?

It depends on how much of the work each database can do for itself, which is what the plan shows you. When the filtering and grouping happen inside your databases, very little data moves and it feels like a normal query. When a big join has to be finished by Query Streams, more moves, and the plan says so before you run it.

Is it safe to point one query at several production databases?

It uses the same security model as every other query here. Each piece travels through your own Network Agent over one encrypted outbound connection, your database logins never leave your network, and every piece is checked read-only, so a federated query cannot write anywhere. Each database only ever sees a query touching the columns you named.

Keep your sources. Connect the answers.

Connect two sources, write one query and review the plan. Federated Queries are included on Free.

Get the free plan