or download this
$connectsql = qq{SELECT b.service_id, d.stop_a, d.stop_b FROM bus_stop
+s a, routes b, service c, topology d WHERE a.stop_reference = c.stop_
+reference AND c.service_id = b.service_id AND a.stop_reference = d.st
+op_a ORDER BY a.stop_reference};
$sth = $dbh->prepare( $connectsql );
...
1 | 3333333333 | 6666666666
2 | 6666666666 | 3333333333
2 | 8888888888 | 1010101010