# Join related data in Coordinator DB

Use a regular SQL join when related rows are available in Coordinator DB tables or another documented local source. Distributed join modifiers and remote query execution are unavailable.

```sql
SELECT customers.id, customers.name, orders.amount
FROM customers
LEFT JOIN orders ON orders.customer_id = customers.id
ORDER BY customers.id, orders.amount;
```

The example assumes the two application tables already exist. A LEFT JOIN preserves customers without orders and fills the missing side with SQL NULL. If an order key has multiple matches, every matching pair contributes a row; check key uniqueness before interpreting totals.

For data held elsewhere, use a documented import workflow to create a suitable local table, validate its keys and then join it. Decide how fresh that imported copy must be and how the application will replace it. A join does not automatically synchronize an external source.

Keep right-side match conditions in `ON` when unmatched left rows must survive. A later `WHERE` predicate on the nullable right side can remove those rows. Inspect the actual plan and result cardinality before changing indexes or denormalizing the data.

See [JOIN behavior](https://coordinatordb.com/docs/reference/statements/select/join), [bulk input](https://coordinatordb.com/docs/concepts/features/operations/insert/bulkinserts) and [query plans](https://coordinatordb.com/docs/reference/statements/explain).
