A developer needs to implement a system audit feature that allows users, assigned to a custom profile named
"Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 6 and 12 months old.
Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 6 to 12 months old?

Correct Answer: B
Given the code snippet, the correct query to retrieve Account History records between 6 and 12 months old would be the one that includes a WHERE clause filtering records where the CreatedDate is greater than or equal to initialDate and less than or equal to endDate. Option B's statement does this correctly by using the >
= and <= operators to define the range between initialDate (which is set to today's date minus 12 months) and endDate (set to today's date minus 6 months). Options A, C, and D either use incorrect comparison operators or compare against the wrong variables, resulting in an incorrect data set being returned.
References
SOQL Date Formats and Date Literals: SOQL and SOSL Reference Guide
Recent Comments (The most recent comments are at the top.)
It is A.
AccountHistory
Correct Answer is Not B . for standard objects salesforce name history object AccountHistory , OpportunityHistory , etc
It is not A, because A has CreatedDate => initialDate which means its older than 12 months.
It is B and its probably free cram bad syntax.
Correct Ans is - A
Because we have AccountHistory and NOT Account_History