I have a situation for which I am trying to find most optimized way.
I have 2 objects Obj_1 and Obj_2. Obj_2 is child of Obj_1 with MD relation.
Each record in Obj_2 is having one field with version number (Integer)
I want to find that for each Obj_1 master record the max versionnumber child Obj_2 record.
I know I can do it by iterating over for loop or by performing 2 queries, but I am thinking more from single query perspective so that I get all child Obj_2 records which are max sharing common parent record.
Thanks Ray