nerdexam
Salesforce

PDII · Question #238

PDII Question #238: Real Exam Question with Answer & Explanation

Sign in or unlock PDII to reveal the answer and full explanation for question #238. The question stem and answer options stay visible for context.

Question

A developer has a requirement to query three fields (Id, Name, Type) from an Account and First and Last names for all Contacts associated with the Account. Which option is the preferred optimized method to achieve this for the Account named 'Ozone Electronics'?

Options

  • AAccount a = [SELECT ID, Name, Type FROM Account WHERE name='Ozone Electronics']; list
  • BAccount a = [SELECT ID, Name, Type, (SELECT FirstName, LastName FROM Contacts) FROM
  • Clist lContacts = new list();
  • Dlist lAccounts = [SELECT ID, Name, Type FROM Account JOIN (SELECT ID, firstname, lastname

Unlock PDII to see the answer

You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full PDII Practice