nerdexam
Salesforce

PDII · Question #253

A company has a custom object, Request_c, that has a checkbox field, Completed_c, and a Lookup to Opportunity, Opportunity_c. Which SOQL query will get a unique list of all of the Opportunity…

The correct answer is D. SELECT Id From Opportunity WHERE Id IN (SELECT Opportunity_c FROM Request_c WHERE. See the full explanation below for the reasoning.

Question

A company has a custom object, Request_c, that has a checkbox field, Completed_c, and a Lookup to Opportunity, Opportunity_c. Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?

Options

  • ASELECT Opportunity_c FROM Request_c WHERE Id IN (SELECT Id FROM Request_c Where
  • BSELECT Opportunity_c FROM Request_c WHERE Completed_c = true
  • CSELECT Id FROM Opportunity WHERE Id IN (SELECT Id FROM Request_c WHERE Completed
  • DSELECT Id From Opportunity WHERE Id IN (SELECT Opportunity_c FROM Request_c WHERE

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    5% (1)
  • C
    5% (1)
  • D
    82% (18)

Community Discussion

No community discussion yet for this question.

Full PDII Practice