The Peer Picker includes a column that identifies the distance in miles from the selected school district or city.
It's a database
stored function
The Name of the function is calcDistance. You need to
pass the Latitude and Longitude of two schools as an input.
eg calcDistance(a.MunLatitude, a.MunLongitude,
b.MunLatitude, b.MunLongitude)BEGIN
RETURN (3959 * 2 * ASIN(SQRT( POWER(SIN((lat1 -
abs(lat2)) * pi()/180 / 2),2) + COS(lat1 * pi()/180 ) * COS( abs(lat2)
* pi()/180) * POWER(SIN((long1 - long2) * pi()/180 / 2), 2)
)));
END