I understand that size() is better than count() on collection valued path expressions.
But in test 2 question 12, it is treated valid:
select count(s.presentations) from Student s
(Assume that presentations is a Collection field in Student)
This query works on some implementations but not with others. Ideally, as per Section 4.8.5, which says, "The path expression argument to COUNT may terminate in either a state field or a association field, or the argument to COUNT may be an identification variable.", it is a valid query and should work.
And even in question 47 of test 3 it says:
Note: As per Section 4.8.5, the path expression argument to COUNT may terminate in either a state field or a association field, or the argument to COUNT may be an identification variable. Therefore, the COUNT(s.presentations) should be valid.
Update: Ah, I see, count in where clause is not valid.
So if the answers are ambiguous, what should we remember to be sure the answers are treated correct on the exam?
count() valid on both id-variable and collection-path?
size() not valid on id-variable, but only on collection-path?