# Write a Parent-to-Child SOQL query from a Master object (Position__c) to get all related Candidate__c names via the Junction Object (Job_Applications__r).

**Topic:** Development · **Difficulty:** Medium · **Asked at:** Deloitte, PwC, Cognizant · **Tags:** soql, scenario, junction, parent-to-child

Read it on the site: https://www.forcechallenges.com/interview-questions/write-a-parent-to-child-soql-query-from-a-master-object-position-c-to-get-all-related-candidate-c-names-via

## Answer

From the master Position__c, use a subquery on the junction's child relationship name (`Job_Applications__r`) and traverse to the Candidate from inside it.

```soql
SELECT Id, Title__c, (SELECT Candidate__r.Name FROM Job_Applications__r) FROM Position__c
```
This returns each Position with the Candidate names reached through the junction records.

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