Select the code that would show it is possible to get from Craiglockhart to Haymarket
SELECT DISTINCT a.name, b.nameFROM stops a JOINroute z ON a.id=z.stopJOINroute y ON y.num = z.numJOIN stops b ON y.stop=b.idWHERE a.name='Craiglockhart'AND b.name ='Haymarket'
Select the code that shows the stops that are on route.num '2A' which can be reached with one bus from Haymarket?
Select the code that shows the services available from Tollcross?
SELECT a.company, a.num, stopa.name, stopb.name FROMroute a JOINroute b ON (a.company=b.company AND a.num=b.num) JOIN stops stopa ON (a.stop=stopa.id) JOIN stops stopb ON (b.stop=stopb.id) WHERE stopa.name='Tollcross'