I have a table where I keep logs of locations of all users from where I need to grab the latest location of all the users and sort it by the distance from provided geometry