SELECT MIN(ABS(P1.x  P2.x)) AS shortest FROM point AS P1
JOIN point AS P2 ON P1.x <> P2.x
Self join

@gloomywang This simply means ignore comparison of a point with itself. We are looking for the shortest distance, but not for zero distance.