# How many levels deep can you traverse in a Child-to-Parent relationship query in SOQL? (Up to 5 levels, or 55 in newer API versions—explain both).

**Topic:** Soql · **Difficulty:** Medium · **Asked at:** Salesforce, Deloitte, PwC · **Tags:** soql, relationships, limits

Read it on the site: https://www.forcechallenges.com/interview-questions/how-many-levels-deep-can-you-traverse-in-a-child-to-parent-relationship-query-in-soql-up-to-5-levels-or-55-in

## Answer

Child-to-parent traversal can go up to **5 levels deep** using dot notation in a single path, e.g. `Contact.Account.Parent.Owner.Manager.Name`.

Separately, a query can reference many parent relationships overall: the documented limit for the total number of child-to-parent relationships in one query is **55** (a count of relationships, not depth). Mixing these up is a common interview mistake.

The exact numbers have changed across API versions, so confirm against the current SOQL limits documentation for your API version.

---
Source: ForceChallenges · last updated 2026-10-21
