this is my current query to calculate between two latitude and longitude, but how do i using this or similar formula to calculate all the latitude and longitude in result?
SELECT ROUND(6353 * 2 * ASIN(SQRT( POWER(SIN((a.GPSLat -
abs(b.GPSLat)) * pi()/180 / 2),2) + COS(a.GPSLat * pi()/180 ) * COS(
abs(b.GPSLat) * pi()/180) * POWER(SIN((a.GPSLon - b.GPSLon) *
pi()/180 / 2), 2) )), 2) as "Total(KM)"
from table1 a
inner join table1 b on a.ID = 70 and b.ID = 71;
This is my database Lat and Lon example
The result count by id70 and id71