Re: SQL Average Function to create a central point
This Worked:
SELECT Sum((WorkLatitude+WorkSecondaryLatitude)/2) AS AvgLat,
Sum((WorkLongitude+WorkSecondaryLongitude)/2) AS AvgLon,Ticket_Id FROM
Tickets WHERE (Ticket_Number = '::Ticket_Number::') GROUP BY
Ticket_Id"
Reference:
WorkLatitude= 36.2710446043358
WorkSecondaryLatitude= 36.2699962811457
WorkLongitude= -98.4748095343318
WorkSecondaryLongitude= -98.4740879146016
My Central Point:
Lat= 36.2705204427407
Lon= -98.4744487244667
I hope I am right.. It looks right...plus I asked a math wiz and he
said "Don't bother me Im playing games..". So hopefully this may help
someone else. If it is right.
0 Comments:
Yorum Gönder
<< Home