Skip to main content
ReferenceApplies to: Unified engine deployments
Joins combine relations using keys or predicates. Qualify shared column names with source aliases. Matching duplicate keys can multiply result rows; inspect key uniqueness before summing joined facts.

Join types

ON predicate names the matching condition. USING (column, ...) matches same-named columns and produces a shared key column. Prefer explicit ON conditions when source key names differ, as in TPC-DS.

Inner join

This joins item attributes to sales and summarizes completed matches. The item key resolves which dimension row belongs to each sales line.

Outer join

Place filters on nullable right-side columns carefully. A condition in WHERE can remove unmatched rows from a left join; a condition in ON controls matching while retaining left rows.

Semi and anti joins

Use a semi join to test for a match without repeating the left row for every right match. An anti join finds missing matches. Null keys do not match under ordinary equality.

Cross join

A cross join multiplies input cardinalities. Restrict each input before using one for exploration.
Native execution rejects null-safe joins and null-aware join forms it cannot preserve. Use ordinary equality with explicit, appropriate handling of null keys. NATURAL joins depend on all common column names and are fragile when schemas change.
Last modified on November 4, 2026