Guest User

Untitled

a guest
Jan 17th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Select *, sqrt((a.x-b.x)^2 + (a.y-b.y)^2) as Distance
  2. from MyData a
  3. Join MyData b
  4. on a.x <> b.x and a.y <> b.y
  5.  
  6. Select top 1 *, sqrt((a.x-b.x)^2 + (a.y-b.y)^2) as Distance
  7. from MyData a
  8. Join MyData b
  9. on a.x <> b.x and a.y <> b.y
  10. order by Distance desc
Add Comment
Please, Sign In to add comment