Added ORDER BY to creating topology

Ensure that running topology multiple times on the same dataset returns the same node numbers each time