612_Shortest Distance in a Plane
[medium]
Table point_2d
holds the coordinates (x,y) of some unique points (more than two) in a plane.
Write a query to find the shortest distance between these points rounded to 2 decimals.
The shortest distance is 1.00 from point (-1,-1) to (-1,2). So the output should be:
Solution 1: using join
Solution 2: using subquery
Last updated