Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- profile.id,
- min(
- round(
- (6371 * acos(
- cos(radians(54.981065)) *
- cos(radians(profile.lat::FLOAT)) *
- cos(radians(profile.lon::FLOAT) - radians(82.872446)) +
- sin(radians(54.981065)) *
- sin(radians(profile.lat::FLOAT))
- ))::FLOAT,
- 3
- )
- ) as distance
- from profile
- where profile.lat is not null and profile.lon is not null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement