aggregation FIRST and LAST should read the earliest and latest line by orderBy