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.

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.
Orders
SQL Server · Head officeerp| Order | Customer | Placed |
|---|---|---|
| Halden Logistics | 9 Oct 2026 | |
| Castellan Foods | 7 Oct 2026 | |
| Northgate Clinics | 3 Oct 2026 | |
| Lakeside Works | 2 Oct 2026 |
Invoices
PostgreSQL · Cloud accountbilling| Invoice | Order | Amount | Status |
|---|---|---|---|
| INV- | 12,480.00 | Open | |
| INV- | 28,900.00 | Overdue | |
| INV- | 17,320.80 | Overdue | |
| INV- | 2,150.00 | Paid |
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.
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'One result. Both sides of the story.
Customer names from orders, invoice details from billing. Already matched.
| Customer | Invoice | Amount | Status |
|---|---|---|---|
| Halden Logistics | INV- | 12,480.00 | Open |
| Castellan Foods | INV- | 28,900.00 | Overdue |
| Northgate Clinics | INV- | 17,320.80 | Overdue |
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.
billing.public.invoices
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
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.
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.
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.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.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.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.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.





