Last active
May 15, 2018 13:40
-
-
Save cobergmd/b908f4daaea2f9f4c25c2038a7dd233c to your computer and use it in GitHub Desktop.
SQL Manhattan Distance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Manhattan Distance | |
-- |a - c| + |b - d| | |
select | |
format(abs((min(lat_n) - max(lat_n))) + abs((min(long_w) - max(long_w))),'F4') | |
from latlongs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment