Sort data by foreign key value, not by foreign key index