14 -  Suppose hometeam A has played in common against hometeam Leicester (say B). So both A and B have played with a common team (say C). Suppose A also played with team D, where B has never played with D. So, do we have to include match (A, D) as well if homegoal - awaygoal > 3. Or do we need to account for only those matches in which the awayteam has played against both A and B.
yes, as we will be considering all the matches with hometeam A
@36_f3
Leicester
        \
          Y
        /
   Set X
        \
        (matches in 2016 with hometeam in set X without removing duplicates)



select five_trains.source_station_name, one_train.destination_station_name, five_trains.distance + one_train.distance as distance, five_trains.path || one_train.destination_station_name as path
  from five_trains, one_train
  where five_trains.destination_station_name = one_train.source_station_name and one_train.destination_station_name not in five_trains.path
