Why D is not correct ? It's because :
"If the list of fields in a SELECT clause includes an aggregate function, you must include all non-aggregated fields in the GROUP BY clause."
For the answer D to be correct, tou have to add ', Type' after GROUP BY Name, like this :
SELECT Type, Name, Max(CreatedDate)MaxDate FROM Account GROUP BY Name, Type LIMIT 5
Source : https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_groupby.htm
B, because the field that we are using for Group by clause can be used in select. (no other field)
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.CRT-450 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
noox
Highly Voted 10 months, 3 weeks agoHR444
Most Recent 1 year, 3 months agoam1
2 years, 6 months ago