ASIN(SQRT(POWER(SIN((35.6527 - lat) * PI() / 180 / 2), 2) + COS(35.6527 * PI() / 180) * COS(lat * PI() / 180) * POWER(SIN((-97.419 - lng) * PI() / 180 / 2), 2) )) AS distance, CAST(DEGREES(ATAN2( RADIANS(lng - -97.419), RADIANS(lat - 35.6527))) + 360 AS decimal) % 360 AS bearing FROM "locations" WHERE (lat BETWEEN 35.21850465066746 AND 36.08689534933254 AND lng BETWEEN -97.95335153642718 AND -96.88464846357282