Sort table entries