Added ORDER BY to creating topology

Added ORDER BY to creating topology in order to return the same node numbers when topology run on same dataset multiple times