Shortest distance in line on x-axis

Points of x coordinates are stored in table “points“. All entries of these points in table are integers and unique. Write a query to find shortest distance between two points on x-axis.   Input Table: points x-axis -3 -6 0 10 Output Table: shortest 3 Explanation: All possible combinations of all points in input table … Read more