Skip to content

Instantly share code, notes, and snippets.

@yoye
Created July 25, 2011 12:01
Show Gist options
  • Save yoye/1103983 to your computer and use it in GitHub Desktop.
Save yoye/1103983 to your computer and use it in GitHub Desktop.
SELECT
((ACOS(SIN(43.61 * PI() / 180) * SIN(latitude * PI() / 180) + COS(43.61 * PI() / 180) * COS(latitude * PI() / 180) * COS((3.87 - longitude) * PI() / 180)) * 180 / PI()) * 60 * 1.1515 * 1.609344)
FROM city
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment