I have a table with 2000 records and with those columns
OutletName, longitude, latitude, geom
I would like to find a way to find the farthest outlet between a selection of outlets
For example we have outletnames
: A,B,C,D,E,F,G,H,I,J,K...
And we would like to know who is the farthest outlet from A between those outlets 'B' 'F' and 'D'
Now I am doing it with lot of queries calculating distances between all of them and comparing the distances in java, but it takes time. Is there a better way to do it?