Skip to content

Instantly share code, notes, and snippets.

@shibby
Last active August 15, 2017 17:19
Show Gist options
  • Save shibby/9707285a0c482f2a61ad59523c6db499 to your computer and use it in GitHub Desktop.
Save shibby/9707285a0c482f2a61ad59523c6db499 to your computer and use it in GitHub Desktop.
(
3959 *
acos(
cos( radians(42.290763) ) *
cos( radians( locations.lat ) ) *
cos(
radians( locations.lng ) - radians(-71.35368)
) +
sin( radians(42.290763) ) *
sin( radians( locations.lat ) )
)
) AS distance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment