開発者は、「監査人」という名前のカスタム プロファイルに割り当てられたユーザーが、アカウント オブジェクトに関連するタスクに対して検索を実行できるようにする、履歴タスク レポート機能を実装する必要があります。
開発者は、検索で 12 ~ 24 か月前のタスクを返すことができることを確認する必要があります。削除されたタスクは除外し、アーカイブされているかどうかに関係なくタスクを含める必要があります。
次のコードの場合、L2 から 24 か月までの範囲のタスクを取得する有効な方法として、プレースホルダーにどの select ステートメントを挿入する必要がありますか?

正解:C
To retrieve Tasks that are between 12 and 24 months old, we need to use a SOQL query that filters based on the CreatedDate. The query must exclude deleted records and include both active and archived tasks. Since Tasks can be archived after a certain period (typically 12 months), we must ensure the query includes these as well.
Option C is correct because it uses ALL ROWS in the SOQL query, which includes both active and archived (soft-deleted) records. The query also correctly uses a range for CreatedDate to ensure it selects Tasks created between 12 to 24 months ago.
Option A is incorrect because it does not include the ALL ROWS keyword, which is necessary to include archived Tasks in the results.
Option B is incorrect because it only retrieves Tasks created in the last 12 months, not between 12 to 24 months ago.
Option D is incorrect because it does not filter Tasks based on their creation date correctly to include only those that are between 12 and 24 months old.
References:
Salesforce Developer Documentation on SOQL and SOSL Reference: SOQL and SOSL Reference Salesforce Developer Documentation on Working with Archived Records: Working with Archived Records