# Write a SOQL query on Contact to fetch the Contact's Name and its parent Account's Name and Industry (Child-to-Parent).

**Topic:** Development · **Difficulty:** Easy · **Asked at:** TCS, Cognizant, Tech Mahindra · **Tags:** soql, scenario, child-to-parent

Read it on the site: https://www.forcechallenges.com/interview-questions/write-a-soql-query-on-contact-to-fetch-the-contact-s-name-and-its-parent-account-s-name-and-industry-child-to

## Answer

Use dot notation from the Contact to its parent Account to read parent fields in the same query, with no join needed.

```soql
SELECT Id, Name, Account.Name, Account.Industry FROM Contact
```
Contacts without an Account still appear, with null parent values.

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