Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
The very basics
Infinite looping
Processing graphs with recursive CTE
30. Traveling salesman – exercise 2


That's it! One more exercise based on that example.


Bristol turned out to be a horrible location – it was too far away from London. Instead, the management decided to split the headquarters into three smaller offices: one in London, and the other two in two other cities.

Produce paths starting in London as before, but they should now consist of 3 cities only (London and two other cities). Sort the paths by the descending total_distance so that the management can decide where to place the offices.

Stuck? Here's a hint!

You only need to modify the outer query a bit!