DistanceMatrix Almost done
Revert "DistanceMatrix Almost done"

This reverts commit a744e7b7b92b3cacfb1309f0c4d049f0194ab969.
SQL query to be fixed