How to calculate distance between multiple points in SQL Server?
问题 I have table with data from GPS, e.g.: Latitude , Longitude , Time , UserId How to aggregate total distance in specified time frame summing all distances by all points (ordered by time) and group data by user? Thanks 回答1: If you are using SQL Server, you might be interested in using the geography data type so you can request the database using the dedicated method and geographical index. The geography data type is available since SQL Server 2008, you can more information right here: http:/