Select newest record when there's a duplicate

looks similar (for the case more rows / groups are to handle)