Select and statistic the objects in memory like SQL