Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT astops.name, cstops.name FROM
- route a JOIN route b ON a.company=b.company AND a.num = b.num
- JOIN route c ON b.company=c.company AND b.num = c.num AND b.stop = c.stop
- JOIN stops astops ON a.stop = astops.id
- JOIN stops bstops ON b.stop = bstops.id
- JOIN stops cstops ON c.stop = cstops.id
- WHERE astops.name = 'Craiglockhart' AND cstops.name = 'Sighthill'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement