BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
2 / 18 · Module 5 — Salesforce Data Model + SOQL · filtered: cheatsheet← prev⊞ allnext →

5.20Child → Parent

We're querying Contact:

Contact
    │
    ↓
 Account

We want:

Contact first name
Contact last name
Account name

SOQL:

SELECT
    Id,
    FirstName,
    LastName,
    Account.Name
FROM Contact

Notice:

Account.Name

Think JavaScript property traversal:

contact.account.name

That's much simpler than thinking in SQL JOINs.