613. Shortest Distance in a Line

# Write your MySQL query statement below
SELECT (MIN(ABS(p1.x-p2.x))) AS shortest
FROM point p1
LEFT JOIN point p2
ON p1.x != p2.x

posted @ 2018-12-20 03:05  yuesi  阅读(145)  评论(0编辑  收藏  举报