I have the following SQL:
select code, distance from places;
The output is below:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
80 2117.61925131453
106 2563.46708627407
I want to be able to just get a single code and the closest distance. So I want it to return this:
CODE DISTANCE
106 386.895834130068
80 2116.6747774121
Still playing with Distinct and Group By.
1 Answer