Postgresql – Error: recursive reference to query "shortestflight" must not appear within a subquery
From "Montreal" as the origin point, I'm trying to find the shortest path to go to another city. But I'm having difficulty when a city is looped. demo at db<>fiddle create table flights(id,src,dst,cost)as values (0,'Montreal','NY', 742.94) ,(1,'Montreal','Detroit', 362.47) ,(2,'NY', 'Detroit',…