Auto join suggestion
✓ functionalStart a JOIN and SQLly can offer the ON clause, favoring real foreign keys and clearly labeling its best guesses.
Start typing JOIN OtherTable and SQLly can offer the
ON clause. It follows a deterministic join path through
the model, preferring declared foreign keys and using name-based relationships only
when needed. Each suggestion includes a confidence signal, so a fact
and an educated guess never look the same.
How it decides
- Declared foreign keys. When a foreign key connects the tables, SQLly uses that exact column mapping first.
- Name-inferred relationships. With no FK, SQLly can match conventions such as
CustomerIdtoCustomer.Idand labels the suggestion as inferred. - In-scope joins. It only offers tables already present in the current
FROM/JOINset, so itsONclause resolves in the query you have.

Confidence matters. A declared-FK join has an exact mapping. An inferred join is often useful too, but it is worth a quick glance before it meets production data.