Salesforce Certified Platform Developer II — Question 184

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?

Answer options

Correct answer: D

Explanation

Option D is correct because it retrieves the unique Opportunity Ids linked to Request_c where Completed_c is true. Option A is incorrect because it selects from Request_c instead of Opportunity, and Option B fails to ensure uniqueness of Opportunity records. Option C is also incorrect as it attempts to select from Opportunity based on the Request_c's Completed status without properly referencing the Opportunity_c field.