Sort records.