1: 2: 3: 4: 5: 6:
select top 20 * from ( select id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers ) a where distance < 25 ORDER BY distance