Created
June 21, 2011 04:35
-
-
Save bkempner/1037252 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
SELECT lat, lon, SQRT( POW( 69.1 * ( lat - 33.673989 ) , 2 ) + POW( 69.1 * ( 111.858430 - lon ) * COS( lat / 57.3 ) , 2 ) ) AS distance FROM cities where distance < 25 ORDER BY distance; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment