SELECT
route, total_duration Duration
FROM
((SELECT
CONCAT_WS(' - ', s1.from_city, s1.to_city) route,
s1.duration total_duration
FROM
flights s1
WHERE
s1.from_city = 'kh'
AND s1.to_city = 'va') UNION (SELECT
CONCAT_WS(' - ', s1.from_city, s1.to_city, s2.to_city) route,
(s1.duration + s2.duration) total_duration
FROM
flights s1
INNER JOIN flights s2 ON s1.to_city = s2.from_city
AND s1.from_city = 'kh'
AND s2.to_city = 'va') UNION (SELECT
CONCAT_WS(' - ', s1.from_city, s1.to_city, s2.to_city, s3.to_city) route,
(s1.duration + s2.duration + s3.duration) total_duration
FROM
flights s1
INNER JOIN flights s2 ON s1.to_city = s2.from_city
AND s1.from_city = 'kh'
INNER JOIN flights s3 ON s3.from_city = s2.to_city
AND s3.to_city = 'va'))
ORDER BY Duration , route
LIMIT 1