A developer needs to implement a historical Task reporting feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the Tasks related to the Account object.
The developer must ensure the search is able to return Tasks that are between 12 and 24 months old. It should exclude any tasks which have been deleted, and include Tasks whether archived or not.
Given the following code, which select statement should be inserted at the placeholder as a valid way to retrieve the Tasks ranging from L2 to 24 months old?

Correct Answer: 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