---
title: "Joining Tables"
description: "A join in Invantive UniversalSQL joins whatever the connection can reach: two tables of one platform, a table of a platform with a table of a database, a\u2026"
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-query-tool/joining-tables
original: https://documentation.invantive.eu/en/docs/invantive-query-tool/joining-tables
updated: 2026-09-04T00:00:00Z
license: https://documentation.invantive.eu/en/
---

A join in Invantive UniversalSQL joins whatever the connection can reach: two tables of one platform, a table of a platform with a table of a database, a table with the answer of another statement. The engine reads each side where it lives and joins them itself.

## An Example
Over the [[Invantive Query Tool/Sample Database|sample database]], each project beside the number of projects in its municipality:

```sql
select pjt.pjt_code
,      pjt.pjt_gemeente
,      tot.aantal
from   Projects@dummy pjt
join   ( select pjt_gemeente gem
         ,      count(*) aantal
         from   Projects@dummy
         group
         by     pjt_gemeente
       ) tot
on     tot.gem = pjt.pjt_gemeente
order
by     tot.aantal desc
,      pjt.pjt_code
```

![The "Results" grid of Invantive Query Tool: eleven projects with their municipality and the number of rows per municipality.](/img/5f472a74128319a53e7afe4350cbebeabe895a3abc02ac58ad1d4f1fd0ad623c/900x410.png)

## Across Platforms
The same statement joins two data containers by naming them:

```sql
select ...
from   Projects@dummy pjt
join   MyTable@sqlserver tbl
on     tbl.code = pjt.pjt_code
```

Both containers have to belong to the database connected to; see [[Invantive Query Tool/Databases and Data Containers|Databases and Data Containers]]. This is what makes an exchange between two platforms one statement instead of a program with an intermediate file.

## What It Costs
A join is not free where one side is a cloud platform. The engine narrows the second side with the keys of the first where the platform can filter on them, and reads the table whole where it cannot. Which of the two happened shows in the [[Invantive Query Tool/Progress|Progress]] panel as the rows a step read, and in the [[Invantive Query Tool/Connection Monitor|Connection Monitor]] as the number of calls.

Two habits keep that in hand: select the columns actually needed rather than `select *`, and put the smaller or better-filtered side first. A join whose driving side is one row and whose other side is a whole cloud table is a different statement from the same join the other way round.

## Release Notes

- [Invantive Query Tool for Windows](/en/release-notes/products/invantive-query-tool)
  - [26.0 to 27.0](/en/release-notes/products/invantive-query-tool?step=26.0-to-27.0)
  - [25.0 to 26.0](/en/release-notes/products/invantive-query-tool?step=25.0-to-26.0)

