Help for this page
SELECT stop_reference, service_id, min(distance) FROM table GROUP BY stop_reference, service_id ;