Lets take the example of the standard objects CollaborationGroup(CG) and CollaborationGroupFeed(CGF). A single CG record can have multiple related CGF records. If I have 10 CG records I want to get only 1 related CGF record for each CG record sorted by CreatedDate (descending) so that finally I will have only 10 CGF records.
So, for example, if there are 3 CGF records CGF1, CGF2 & CGF3 (written in descending order (by createddate)) for a single CG record CG1. I only want to get CGF1 as the result of my SOQL query.