Help for this page

Select Code to Download


  1. or download this
    -- not what you want
    SELECT service_id, min(distance) FROM table
    GROUP BY service_id;
    
  2. or download this
    SELECT stop_reference, service_id, distance FROM table
    ORDER BY service_id, distance;
    
  3. or download this
    my $last_service_id = -8675309;    # for a good time, call
    while ($sth->fetch()) {
    ...
            $last_service_id = $service;
        }
    }