문제
정답
SELECT ROUND(SQRT(
POW(P1.x - P2.x, 2) + POW(P1.y - P2.y, 2)
),2) AS shortest
FROM Point2D AS P1
JOIN Point2D AS P2 ON P1.x != P2.x OR P1.y != P2.y
ORDER BY shortest ASC
LIMIT 1
SELECT ROUND(SQRT(
POW(P1.x - P2.x, 2) + POW(P1.y - P2.y, 2)
),2) AS shortest
FROM Point2D AS P1
JOIN Point2D AS P2 ON P1.x != P2.x OR P1.y != P2.y
ORDER BY shortest ASC
LIMIT 1