Welcome to Subscribe On Youtube
Formatted question description: https://leetcode.ca/all/613.html
613. Shortest Distance in a Line (Easy)
Solution 1.
# OJ: https://leetcode.com/problems/shortest-distance-in-a-line/
SELECT
MIN(ABS(p1.x - p2.x)) AS shortest
FROM
point p1
JOIN
point p2 ON p1.x != p2.x