Sorting of rows done according to first column of returned data frame.