nerdexam
Salesforce

PDII · Question #407

Which two relationship queries use the proper syntax? (Choose two.)

The correct answer is C. SELECT Name, (SELECT LastName FROM Contacts) FROM Account D. SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Media'. See the full explanation below for the reasoning.

Question

Which two relationship queries use the proper syntax? (Choose two.)

Options

  • ASELECT Id, Name, Account__r.Name FROM Contact WHERE Account__r.Industry = 'Media'
  • BSELECT Name, (SELECT LastName FROM Contacts__r) FROM Account
  • CSELECT Name, (SELECT LastName FROM Contacts) FROM Account
  • DSELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Media'

How the community answered

(41 responses)
  • A
    5% (2)
  • B
    12% (5)
  • C
    83% (34)

Community Discussion

No community discussion yet for this question.

Full PDII Practice